I think the description confuses the render tree with DOM tree, which made me re-read it several times. This is 'just' a HTML parsing problem.
The first occurrence of the sequence </script inside a <script> element ends the element. The HTML parser is not even supposed to try to parse javascript, it does not and should not know about JS syntax.
But, yeah, inserting arbitrary strings into <script> elements is a problem.
4
u/bonafidebob Aug 09 '12
I think the description confuses the render tree with DOM tree, which made me re-read it several times. This is 'just' a HTML parsing problem.
The first occurrence of the sequence </script inside a <script> element ends the element. The HTML parser is not even supposed to try to parse javascript, it does not and should not know about JS syntax.
But, yeah, inserting arbitrary strings into <script> elements is a problem.