Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
stof merged 1 commit intosymfony:2.7fromjakubkulhan:fix-css-selector
Mar 8, 2018

Conversation

@jakubkulhan
Copy link
Contributor

QA
Branch?2.7
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
LicenseMIT

Vendor prefixes use- (dash) at the start of CSS identifiers.

$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;
Copy link
Member

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?

Copy link
ContributorAuthor

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
Copy link
Member

stof commentedMar 8, 2018

Good catch, thanks@jakubkulhan.

@stofstof merged commit16e86bc intosymfony:2.7Mar 8, 2018
stof added a commit that referenced this pull requestMar 8, 2018
… 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
This was referencedApr 2, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

@stofstofstof approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@jakubkulhan@stof@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp