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

CRLF inside </noscript> occurs eof-in-element-that-can-contain-only-text error #710

Closed
sapphi-red opened this issue Oct 24, 2022 · 2 comments · Fixed by #715
Closed

CRLF inside </noscript> occurs eof-in-element-that-can-contain-only-text error #710

sapphi-red opened this issue Oct 24, 2022 · 2 comments · Fixed by #715

Comments

@sapphi-red
Copy link

<!DOCTYPE html>
<html>
  <body>
    <!-- prettier-ignore -->
    <noscript>foo</noscript
    >
  </body>
</html>

reproduction: https://stackblitz.com/edit/node-djhqfm?file=input-lf.html,index.js

If it's using LF instead of CRLF, the error won't happen. I'm not much familiar with HTML spec but I guess it should work in the same way since it's normalized before the tokenization stage.

Original issue: vitejs/vite#10580

fb55 added a commit that referenced this issue Oct 27, 2022
Peeking didn't properly support carriage returns, which led the parser to hang in special tags.

Fixes #710
@fb55
Copy link
Collaborator

fb55 commented Oct 27, 2022

Thanks for the report! I have a fix incoming in #715.

@sapphi-red
Copy link
Author

Thank you!

@fb55 fb55 closed this as completed in #715 Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants