Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[CssSelector] Fix CSS identifiers parsing - they can start with dash#26450
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| $this->nonAsciiPattern ='[^\x00-\x7F]'; | ||
| $this->nmCharPattern ='[_a-z0-9-]|'.$this->escapePattern.'|'.$this->nonAsciiPattern; | ||
| $this->nmStartPattern ='[_a-z]|'.$this->escapePattern.'|'.$this->nonAsciiPattern; | ||
| $this->nmStartPattern ='[_a-z-]|'.$this->escapePattern.'|'.$this->nonAsciiPattern; |
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.
Checking theofficial CSS grammar I found this:
nmstart[_a-z]|{nonascii}|{escape}nmchar[_a-z0-9-]|{nonascii}|{escape}ident-?{nmstart}{nmchar}*So maybe we should move the optional starting- to$this->identifierPattern?
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.
Sure, fixed according to CSS grammar.
stof commentedMar 8, 2018
Good catch, thanks@jakubkulhan. |
… with dash (jakubkulhan)This PR was merged into the 2.7 branch.Discussion----------[CssSelector] Fix CSS identifiers parsing - they can start with dash| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| License | MITVendor prefixes use `-` (dash) at the start of CSS identifiers.Commits-------16e86bc [CssSelector] Fix CSS identifiers parsing - they can start with dash
Vendor prefixes use
-(dash) at the start of CSS identifiers.