.html() return different values in chrome and in other browsers. jquery bug?
.html() returns different values in chrome and other web browsers when the html tag has an inner <CDATA.
example:
<p style="display:none"><textarea id="template" rows="0" cols="0">
<![CDATA[
{#template MAIN}
{#foreach $T.children as node}
<p>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</p>
{#/for}
{#/template MAIN}
]]>
</textarea></p>
script:
$('#template').html()
In chrome return:
<![CDATA[
{#template MAIN}
{#foreach $T.children as node}
<p>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</p>
{#/for}
{#/template MAIN}
]]>
and in other browsers return:
<![CDATA[
{#template MAIN}
{#foreach $T.children as node}
<p>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</p>
{#/for}
{#/template MAIN}
]]>
Pay attention to < and > of <![CDATA[. In Chrome this characters are not escaped.
Is this a possible jquery's BUG?