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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

infinite loop in the tokenizer #29231

Closed
rkirov opened this issue Mar 11, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@rkirov
Copy link
Contributor

commented Mar 11, 2019

馃悶 bug report

Affected Package

Bug in packages/compiler/src/ml_parser/lexer.ts

Is this a regression?

Likely caused by f7c867e

Description

A clear and concise description of the problem...

馃敩 Minimal Reproduction

This snippet reproduces the infinite loop.

<input matInput type="text" formControlName="{{id}}
       id="input-{{section.id}}-{{id}}"">

馃實 Your Environment

Angular Version:


Google HEAD

@rkirov

This comment has been minimized.

Copy link
Contributor Author

commented Mar 11, 2019

Duh, there is a missing ", that I just saw. In any case the tokenizer shouldn't go into infinite loop when faced with malformed input.

@rkirov

This comment has been minimized.

Copy link
Contributor Author

commented Mar 11, 2019

The original intent of the authors was: <input matInput type="text" formControlName="{{id}}" id="input-{{section.id}}-{{id}}">

@ngbot ngbot bot added this to the needsTriage milestone Mar 11, 2019

pkozlowski-opensource added a commit to pkozlowski-opensource/angular that referenced this issue Mar 13, 2019

pkozlowski-opensource added a commit to pkozlowski-opensource/angular that referenced this issue Mar 15, 2019

fix(core): parse incorrect ML open tag as text
This PR alligns markup language lexer with the previous behaviour in version 7.x:
https://stackblitz.com/edit/angular-iancj2

While this behaviour is not perfect (we should be giving users an error message
here about invalid HTML instead of assuming text node) this is probably best we
can do without more substential re-write of lexing / parsing infrastructure.

This PR just fixes angular#29231 and restores VE behaviour - a more elaborate fix will
be done in a separate PR as it requries non-trivial rewrites.

@matsko matsko closed this in 4605df8 Mar 19, 2019

matsko added a commit that referenced this issue Mar 20, 2019

fix(core): parse incorrect ML open tag as text (#29328)
This PR alligns markup language lexer with the previous behaviour in version 7.x:
https://stackblitz.com/edit/angular-iancj2

While this behaviour is not perfect (we should be giving users an error message
here about invalid HTML instead of assuming text node) this is probably best we
can do without more substential re-write of lexing / parsing infrastructure.

This PR just fixes #29231 and restores VE behaviour - a more elaborate fix will
be done in a separate PR as it requries non-trivial rewrites.

PR Close #29328

wKoza added a commit to wKoza/angular that referenced this issue Apr 17, 2019

fix(core): parse incorrect ML open tag as text (angular#29328)
This PR alligns markup language lexer with the previous behaviour in version 7.x:
https://stackblitz.com/edit/angular-iancj2

While this behaviour is not perfect (we should be giving users an error message
here about invalid HTML instead of assuming text node) this is probably best we
can do without more substential re-write of lexing / parsing infrastructure.

This PR just fixes angular#29231 and restores VE behaviour - a more elaborate fix will
be done in a separate PR as it requries non-trivial rewrites.

PR Close angular#29328

wKoza added a commit to wKoza/angular that referenced this issue Apr 17, 2019

fix(core): parse incorrect ML open tag as text (angular#29328)
This PR alligns markup language lexer with the previous behaviour in version 7.x:
https://stackblitz.com/edit/angular-iancj2

While this behaviour is not perfect (we should be giving users an error message
here about invalid HTML instead of assuming text node) this is probably best we
can do without more substential re-write of lexing / parsing infrastructure.

This PR just fixes angular#29231 and restores VE behaviour - a more elaborate fix will
be done in a separate PR as it requries non-trivial rewrites.

PR Close angular#29328
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.