Check if element without attribute is allowed#300
Open
kesselb wants to merge 1 commit intoezyang:masterfrom
Open
Check if element without attribute is allowed#300kesselb wants to merge 1 commit intoezyang:masterfrom
kesselb wants to merge 1 commit intoezyang:masterfrom
Conversation
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
bytestream
reviewed
Aug 11, 2021
Contributor
There was a problem hiding this comment.
It looks like the attrib part of the ABNF isn't actually implemented:
// attrib
// : '[' S* IDENT S* [ [ '=' | INCLUDES | DASHMATCH ] S*
// [ IDENT | STRING ] S* ]? ']'I think the simple_selector regex should be updated?
$components = preg_split('/([#.:\[\]])/', $x, -1, PREG_SPLIT_DELIM_CAPTURE);Two other points to note:
GitHub CI isn't running the ExtractStyleBlocksTest because there is no csstidy implementation...(2582405)- Is it intended that
* img[tabindex=\"0\"] + divbecomes* img + divas that has different meaning to what was originally intended?body.class[foo="attr"] {text-align:right;}for example gets completely removed
Contributor
|
Hi, I also experienced that bug 2 years ago or so, and I quickly fixed it by changing line 243 to this:
Which means I introduced this check: It works very good since then 😃 But I would prefer to have a 100% correct solution upstream of cause 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #299
Note: My knowledge about css parsing is limited. I'm not sure if that's a proper fix 🙈