-
Notifications
You must be signed in to change notification settings - Fork 4.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
Add a polyfill for the normalize function to support older browsers #13157
Comments
Looks like https://github.com/walling/unorm could be used, but it hasn‘t been updated in a while. |
Yes, @swissspidy - this was mentioned before:
Maybe just a stable script? |
Three years later we don't support IE anymore and WebView Android seems to be not relevant enough to fox anything here. The mentioned library https://github.com/walling/unorm has updates in 2019 (1.5 and 1.6) but since then no one tried to updated this ticket here and since then there are no updates anymore. It seems that we could close this issue due to missing relevance or interest from the Gutenberg devs. |
Describe the bug
Following the advise from here to open an issue: #7105 (comment)
Related: #433 #6958
Pasting NFD text will break the internal search in WP and can break the search on the website (like in Firefox), spellcheck, and the display (showing the character + combining character side by side and not overlaying it, Firefox is failing here for example).
And it can happen all the time that apps output NFD text and not NFC, like the W3C is recommending.
To Reproduce
Steps to reproduce the behavior:
(This also affects other areas: Pasting the text in the title would break the transliteratin from "ü" to "ue" in the slug for German sites for example.
Expected behavior
Should work in all browsers. Browsers with no support should use a polyfill.
Screenshots
Broken display in Firefox with NFD text:
Desktop (please complete the following information):
See link above for problematic browsers with no support:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize
Sometimes people do not have the latest OS and therefore not the latest browser version!
Additional context
This is not a Mac specific problem but because of the filesystem HFS+ which uses NFD it is mostly a Mac problem. But every bad program can output NFD instead of NFC and all web CMS should normalize user input to NFC in this case (as recommended by the W3C).
If you need more information about NFC and how non-NFC is breaking WP, please ask specific question and I am happily try to answer them. Thank you very much!
The text was updated successfully, but these errors were encountered: