Reasons to use D
Adam D. Ruppe via Digitalmars-d
digitalmars-d at puremagic.com
Fri Sep 11 12:54:53 PDT 2015
On Friday, 11 September 2015 at 15:30:05 UTC, Sebastiaan Koppe
wrote:
> Does it have to do with char encodings?
Not the issue I hit: it has to do with the script tags being
ripped out. It says "To set the content of a <script> element,
which does not contain HTML, use the .text() method and not
.html().", but it doesn't say all script in the middle of the
html will be ripped out too.
The way I read that was $("script").html() is wrong and you
should use $("script").text(). OK, script tags are implicitly
cdata so indeed it might be different.. but if you do
"div".innerHTML = "<script>sdasd</script>" in the browser, it all
works!
So when it said "This method uses the browser's innerHTML
property", I wasn't expecting it to behave significantly
differently!
More information about the Digitalmars-d
mailing list