forked from Floorp-Projects/Floorp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1806042 - Replace Narrow No-Break Space (U+202F) and Thin Space (…
…U+2009) in DateTimeFormat/DateTimeIntervalFormat output with regular Space to mitigate breakage on fragile websites. r=anba The data for a bunch of locales was updated in ICU 72 to use U+202F and U+2009 in places where previously it had regular Space characters. Unfortunately, this breaks some sites that attempt to parse the formatted output using naive regular expressions (or similar) that just expect space, rather than "any whitespace", and fail to match against the new formatted output. To mitigate this, until more browsers update to the newer ICU/CLDR data and pressure builds on sites to fix such fragile scripts, we can post-process the formatted output from ICU to replace these "special" spaces with standard ASCII space characters. This workaround is designed to be easily disabled at build time by just changing the DATE_TIME_FORMAT_REPLACE_SPECIAL_SPACES #define, when we're ready to try re-enabling the updated formats. Differential Revision: https://phabricator.services.mozilla.com/D165408
- Loading branch information
Showing
2 changed files
with
80 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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