-
Notifications
You must be signed in to change notification settings - Fork 381
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
Include mbstring polyfill #5511
Comments
This is only necessary if a site is not using UTF-8 already, correct? It looks like 95% of sites use UTF-8 already. So probably very few sites would ever encounter an issue here? |
Uhm, probably? Not sure how many sites have odd |
Did it come up as an actual problem for Web Stories? |
We had a couple of reports about mangled special chars in the past, where the encoding was off. But we'd also use |
A question was raised in php-css-parser about whether mbstring should be made a hard-requirement: MyIntervals/PHP-CSS-Parser#254. Nevertheless, polyfill-mbstring requires PHP 7.1+ so we can't use it anyway. |
We use an older version (1.18) which still supports PHP 5.6+. So does 1.19 I think (at least from what I can tell after looking at symfony/polyfill-mbstring@39d483b) |
Feature description
I originally opened this at GoogleForCreators/web-stories-wp#4898 but this might be useful as part of the AMP plugin itself.
amp-wp/lib/common/src/Dom/Document.php
Lines 1072 to 1076 in 708a65b
The
Document
class usesmb_convert_encoding
to fix the encoding if needed. That function is part of thembstring
extension which can be missing or outdated on certain servers.For those cases, https://github.com/symfony/polyfill-mbstring/ might be useful.
Caveats:
mcaskill/composer-exclude-files
to prevent files from being loaded automatically and steer that ourselves.Curious to hear thoughts on this.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: