-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
fix(compiler): incorrectly inferring content type of SVG-specific title tag #40259
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT about adding some tests to packages/compiler/test/ml_parser/lexer_spec.ts
, e.g. testing the simple case but also testing with child elements?
Sure. By "testing with child elements", do you mean having a |
A |
5cb45e3
to
18fa418
Compare
The extra unit tests have been added. |
…le tag The parser has a list of tag definitions that it uses when parsing the template. Each tag has a `contentType` which tells the parser what kind of content the tag should contain. The problem is that the browser has two separate `title` tags (`HTMLTitleElement` and `SVGTitleElement`) and each of them has to have a different `contentType`, otherwise the parser will throw an error further down the pipeline. These changes update the tag definitions so that each tag name can have multiple content types associated with it and the correct one can be returned based on the element's prefix. Fixes angular#31503.
18fa418
to
693fbf1
Compare
Merge assistance: needs a presubmit. |
…le tag (#40259) The parser has a list of tag definitions that it uses when parsing the template. Each tag has a `contentType` which tells the parser what kind of content the tag should contain. The problem is that the browser has two separate `title` tags (`HTMLTitleElement` and `SVGTitleElement`) and each of them has to have a different `contentType`, otherwise the parser will throw an error further down the pipeline. These changes update the tag definitions so that each tag name can have multiple content types associated with it and the correct one can be returned based on the element's prefix. Fixes #31503. PR Close #40259
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The parser has a list of tag definitions that it uses when parsing the template. Each tag has a
contentType
which tells the parser what kind of content the tag should contain. The problem is that the browser has two separatetitle
tags (HTMLTitleElement
andSVGTitleElement
) and each of them has to have a differentcontentType
, otherwise the parser will throw an error further down the pipeline.These changes update the tag definitions so that each tag name can have multiple content types associated with it and the correct one can be returned based on the element's prefix.
Fixes #31503.