Basically:
I have this HTML:
<div id="foo"><img src="/foo/bar/{var}/foo" alt="{var}"></div>
When calling (using jQuery in Firefox):
$("#foo").html()
I get:
<img src="/foo/bar/%7Bvar%7D/foo" alt="{var}">
My desired output is:
<img src="/foo/bar/{var}/foo" alt="{var}">
What's going on here? Any tips for how to resolve this?
I guess I'd be surprised if the solution was to use regex to undo the HTML entities conversion. Using parens instead of braces seems to cause the same result (with different HTML entities).
Edit: I tried this using square brackets ([
and ]
), and unlike parens and braces the brackets are not converted to HTML entities. Do parens and braces have some special meaning here?