Commit e434a3a
authored
Use wp_is_valid_utf8() and wp_scrub_utf8() from the new utf8.php decoder (#200)
Replaces two instances of the old UTF-8 decoding utilities with the new
utf-8.php toolkit by @dmsnell:
*
https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/compat-utf8.php
*
https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/utf8.php
This PR only touches two tactical usages of the old tools:
* Blueprint validation now uses `wp_is_valid_utf8`
* CSSProcessor now uses `wp_scrub_utf8` instead of
`_wp_scrub_utf8_fallback`
More refactoring is coming once there's a faster alternative to
`_wp_scan_utf8`, see
https://core.trac.wordpress.org/ticket/63863#comment:51
Related to #196.
Follows up on #199 and
#197.
## Testing instructions
If the CI passes, we're good. Unicode-related scenarios are covered by
tests.1 parent 31317cc commit e434a3a
File tree
8 files changed
+1049
-1003
lines changed- components
- Blueprints
- DataLiberation/URL
- Encoding
8 files changed
+1049
-1003
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
| 382 | + | |
390 | 383 | | |
391 | 384 | | |
392 | 385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
1528 | 1528 | | |
1529 | 1529 | | |
1530 | 1530 | | |
1531 | | - | |
| 1531 | + | |
1532 | 1532 | | |
1533 | 1533 | | |
1534 | 1534 | | |
| |||
0 commit comments