Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<textarea></aaaaa... should insert a text node? #1306

Open
zcorpan opened this issue May 23, 2016 · 1 comment
Open

<textarea></aaaaa... should insert a text node? #1306

zcorpan opened this issue May 23, 2016 · 1 comment

Comments

@zcorpan
Copy link
Member

zcorpan commented May 23, 2016

@RReverser found this in #1257 (comment)

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4224

  window[0].document.write('<textarea></textar');

So far so good; no EOF yet (no document.close()) and a script might later write ea> to finish the end tag.

Now consider

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4225

  window[0].document.write('<textarea></textart');

Per spec this should have the same DOM as the previous one, and the parser having consumed </textart into the temporary buffer, waiting for a > or space or slash or EOF.

Two problems:

  • This can cause unnecessary OOM in streaming parsers that implement the spec literally, for <textarea></aaaaaa...
  • Browsers disagree for this case; Gecko seems to check each character if it still matches what is expected, while WebKit/Blink/IE11 seem to fill the temporary buffer like the spec.
@zcorpan
Copy link
Member Author

zcorpan commented May 25, 2016

cc @hsivonen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant