The UPDATE . Looks like the browser behavior TimWolla commented on - how should I normalize to an unlimited version, reliably in a cross browser?
HTML:
<div id="test"><a href="#{one}">#{two}</a></div>
JS:
$('#test').html()
=> <a href="#%7Bone%7D">
Note that #{one}in href it is escaped, but #{two}not.
Is there a better way than just a unescapewhole line?
unescape($('#test').html())
=> <a href="#{one}">
Here is an example: http://jsfiddle.net/kenn/n8veL/
source
share