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

Rewriter: text content longer than 65536 chars is truncated #292

Closed
hedgepigdaniel opened this issue Apr 18, 2019 · 1 comment · Fixed by #432
Closed

Rewriter: text content longer than 65536 chars is truncated #292

hedgepigdaniel opened this issue Apr 18, 2019 · 1 comment · Fixed by #432
Labels

Comments

@hedgepigdaniel
Copy link

See minimal reproduction here: https://github.com/hedgepigdaniel/parse5-bug

I tried to find a bug in the parse5-sax-parser but the test I created for it succeeds: https://github.com/inikulin/parse5/compare/master...hedgepigdaniel:test/waterline?expand=1

So I assume that it has something to do with the sourceCodeLocationInfo option passed to the SAXParser by RewritingStream.

An effective workaround is to set RewritingStream().tokenizer.preprocessor.bufferWaterline = Infinity as seen here: https://github.com/hedgepigdaniel/parse5-bug/blob/master/index.js#L7-L8

@petercmuc
Copy link

petercmuc commented Jan 13, 2022

Hi
we're facing the same problem: the large contents of a script tag are truncated.
Can we move the priority of the bug and accept the bugfix that @qnighy provided?
BTW: we are using Angular13 and have no direct possibility to use the provided workaround above by @hedgepipdaniel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants