PDA

View Full Version : Using Href in template



HoldemJacket
6 Apr 2007, 6:09 AM
I'm using templates and everything seems to work fine unless I try to replace an href in an anchor tag. Here is a quick example with the output HTML. As you can see the all of the substitutions work correctly except for the href, which just gets encoded. 'dest' even works when used inside an input tag. Any ideas on what's wrong?

thanks.

This is using the Beta, by the way.


<div id="t1" style="visibility:hidden;position:absolute;top:0px;">
{msg}<a href="{dest}">{display}</a><br><input value="{dest}">
</div>

<div id="output"/>



Ext.onReady( function(){
var t1 = Ext.Template.from(Ext.get('t1'));
t1.append(Ext.get('output'), {msg:'Hello', dest:'gosomewhere', display:'somewhere'}, true);

});

Here's the output:



<div id="output">

Hello<a href="%7Bdest%7D">somewhere</a><br><input value="gosomewhere">
</div>

BernardChhun
6 Apr 2007, 6:24 AM
that's a bug alright. I can confirm that this was working in the old 0.33~0.40 days as I'm still using it 8-|