-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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(isRgbColor): Fix validation of rgb(a)ColorPercentage strings #2114
Conversation
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #2114 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 105 105
Lines 2335 2335
Branches 586 586
=========================================
Hits 2335 2335
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Are we concerned that this is a breaking change or do we see this more as a fix? Could there be someone out there who genuinely wants to permit some kind of trailing text, such as |
I want to say no, that trailing semicolon would rather be part of CSS syntax, instead of the rgb color itself, don't you think? on another note: EDIT: Seems like the work has already been done or at least started here: #2029 |
I think that people should sanitize the input enough so there is no trailing text. Just like text added to the beginning. Btw; we should do the same for |
which issue exactly do you mean? if it is about trailing strings: That issue is not present in |
Yeah, I was looking at the |
4b06727
to
67ba926
Compare
Fix validation of "rgb(a)ColorPercent" strings, see #2113
The current RegExp is missing the "end of string" anchor, so it will also match values with additional string content after the actual rgb color part, kindly check the issue above for examples.
This fixes #2113
Checklist
[ ] README updated (where applicable)