-
Notifications
You must be signed in to change notification settings - Fork 9.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
htmlClass pattern validation is too restrictive #32004
Comments
Hi @thomas-kl1. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. Please, add a comment to assign the issue:
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento I am working on this |
Hi @thomas-kl1, |
Hi @ihor-sviziev. Thank you for working on this issue.
|
@ihor-sviziev there is many css framework that use "@ " in classnames. Anyway the current validation it too much restrictive regarding this ressource https://www.w3.org/TR/CSS22/syndata.html There is no valid point to prevent using other characters and some could be easily escaped thanks to the escaper object. |
TBH I never saw that "at" symbol used in the class names, I also didn't see it in any CSS frameworks, and I personally don't think it's a good idea because it will confuse people. Maybe you could provide some examples? I still believe this issue having a too-small amount of people. Probably priority for this issue should be P4, which is the lowest priority. |
You missed the point. The point: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier If you need the full standard documentation, there's the links:
That's your thought, it doesn't make it true. Some in-house and proprietary frameworks could use chars that are not part of the current rules:
That's also your opinion, developers are free to use it or not, so there is no confusion either.
Since some major companies are using it, it's pretty much valid to me, so it's still opinionated to me What's the reason behind those Magento's rules? What is the legitimate design to write these regex patterns? Also I've used the "@" character as an example, but it could be any that follows the standard:
We could agree or disagree to use such characters for identifiers, but we might follow the standards. The decision to use such characters is scoped to project, not to the framework. |
@sivaschenko @sidolov @gabrieldagama, could you review this issue and comment,s and provide your opinion? |
Hello, I'm reopening this issue because it is also a problem for us. It makes even more sense now that Tailwind is around the place for a lot of projects. The defined xsd is not scalable and do not take in account technologies or evolutions. As @thomas-kl1 mentioned, this is not only concerning the @ symbol but all symbols accepted by the W3 standards. Why can't we make this evolve? |
at least colon is now accepted :') 34115de |
Related to : #36452 which may fix this issue |
Hi @thomas-kl1 ,
Container added in app/code/Magento/Ui/view/base/templates/control/button/default.phtml |
Hi @engcom-November. Thank you for working on this issue.
|
@engcom-November sure after 2 years without updates, maybe it have been fixed somewhere by somebody... |
Hi @engcom-November, |
Good catch @ihor-sviziev I didn't checked the screenshot 😅 |
Hi @ihor-sviziev / @thomas-kl1 , Thank you for the response.
Hence confirming the issue. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-7854 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-November. Thank you for verifying the issue. |
Fixed by #36452 |
Resource: https://www.w3.org/TR/CSS22/syndata.html
Part 4.1.3
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
The text was updated successfully, but these errors were encountered: