The editor tends mess up DekiScript when used inside "src" or "href" attributes. The work around is to use the web.html function to dynamically generate the desired HTML code on the fly.
{{
var parent = page.parent;
if(parent) {
web.html('<a href="' .. parent.uri .. '"><img src="/skins/common/images/nav-parent-docked.gif" /></a>')
}
}}
Here is the output: