-
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 encapsulating selectors with escape sequences #40264
fix(compiler): incorrectly encapsulating selectors with escape sequences #40264
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.
LGTM, thanks for the fix @crisbeto 👍
CSS supports escaping in selectors, e.g. writing `.foo:bar` will match an element with the `foo` class and `bar` pseudo-class, but `.foo\:bar` will match the `foo:bar` class. Our shimmed shadow DOM encapsulation always assumes that `:` means a pseudo selector which breaks a selector like `.foo\:bar`. These changes add some extra logic so that escaped characters in selectors are preserved. Fixes angular#31844.
053232c
to
79c12bb
Compare
…ces (#40264) CSS supports escaping in selectors, e.g. writing `.foo:bar` will match an element with the `foo` class and `bar` pseudo-class, but `.foo\:bar` will match the `foo:bar` class. Our shimmed shadow DOM encapsulation always assumes that `:` means a pseudo selector which breaks a selector like `.foo\:bar`. These changes add some extra logic so that escaped characters in selectors are preserved. Fixes #31844. PR Close #40264
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. |
CSS supports escaping in selectors, e.g. writing
.foo:bar
will match an element with thefoo
class andbar
pseudo-class, but.foo\:bar
will match thefoo:bar
class. Our shimmed shadow DOM encapsulation always assumes that:
means a pseudo selector which breaks a selector like.foo\:bar
.These changes add some extra logic so that escaped characters in selectors are preserved.
Fixes #31844.