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!

Reply via email to