Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
d332205
Kickoff migrating URLs in CSS
adamziel Oct 21, 2025
adb07a9
Support Unicode escapes
adamziel Oct 21, 2025
40380e5
Simplify the replacements, format the code
adamziel Oct 21, 2025
f6710aa
Improve clarity of the CSSUrlProcessor
adamziel Oct 22, 2025
ff59ffd
Test CSS unicode escapes decoder
adamziel Oct 22, 2025
0813667
Ditch regexp
adamziel Oct 22, 2025
3b69730
PHPCS
adamziel Oct 22, 2025
95a1302
Do not allocate memory for every match optimistically
adamziel Oct 22, 2025
e98c3ba
Test for data URI
adamziel Oct 22, 2025
3bdbda6
Skip data URIs in the replacement logic
adamziel Oct 22, 2025
8a5e734
Optimize get_parsed_url() for data uris
adamziel Oct 22, 2025
3739a95
Simplify the CSS URL Processor
adamziel Oct 22, 2025
0d5d95f
Move URL parsing from CSS processor to BlockMarkupURLProcessor
adamziel Oct 22, 2025
5feafb5
Use wp.org as a test domain
adamziel Oct 22, 2025
c387bd5
Simplify the css processor integration
adamziel Oct 23, 2025
2b2170b
Add a generic CSS Processor
adamziel Oct 24, 2025
ee3ed64
Simplify consume_string()
adamziel Oct 24, 2025
cd32ab2
Pass most CSS tokenizer test cases
adamziel Oct 24, 2025
4b75739
Less failures
adamziel Oct 24, 2025
d3d1b07
1 last failure
adamziel Oct 24, 2025
0245453
Remove the offending fuzzer test
adamziel Oct 24, 2025
8996fd4
Adjust details
adamziel Oct 28, 2025
38f89af
Use codepoints instead of bytes for decoding idents
adamziel Oct 29, 2025
2382057
Use the bundled unicode decoder
adamziel Oct 29, 2025
663db21
Do not concat to repr when consuming numeric values
adamziel Oct 29, 2025
c647699
Comments, renaming for clarity
adamziel Oct 29, 2025
8227327
Simplify consume_ident_sequence()
adamziel Oct 29, 2025
2182023
Fix inconsistencies in CSSProcessor
adamziel Oct 29, 2025
20947cb
Simplify is_valid_escape
adamziel Oct 29, 2025
43301e6
Simplify would_next_3_code_points_start_an_ident
adamziel Oct 29, 2025
2c0b357
Simplify is_ident_code_point_at
adamziel Oct 29, 2025
46ce619
Reformat and further simplify
adamziel Oct 29, 2025
eeba23f
Reformat and further simplify
adamziel Oct 29, 2025
b427f9d
PHPCS
adamziel Oct 29, 2025
0842b67
Remove CSS URL Processor
adamziel Oct 29, 2025
0bbca21
Regenerate tests
adamziel Oct 29, 2025
034bf87
Decide on the ident vs delim test – it seems faulty, I removed it.
adamziel Oct 29, 2025
c2e5e08
List specific token values in tests
adamziel Oct 29, 2025
685400c
Simplify the CSS processor and the test suite
adamziel Oct 29, 2025
ab1b3c6
multiline CSS sample in test_tokenize_labels_core_tokens
adamziel Oct 29, 2025
2b66102
Clearer tests, document the string normalization tradeoff
adamziel Oct 29, 2025
93daf5a
Rename Processor to Tokenizer
adamziel Oct 29, 2025
04578ab
Remove EOF token
adamziel Oct 29, 2025
7b1f632
Document token_unit
adamziel Oct 29, 2025
0e97f55
Reorder props
adamziel Oct 29, 2025
a9a8357
Consolidate decode_escape_at and consume_escape_at
adamziel Oct 30, 2025
d565a53
Small cleanup
adamziel Oct 30, 2025
26df610
Lint, simplify, lazy decode tokens
adamziel Oct 30, 2025
a6567b5
Consolidate decode_string_or_url and get_normalized_token
adamziel Oct 30, 2025
7791785
Static constructor requiring UTF-8 declaration
adamziel Oct 30, 2025
439a665
Use \u unicode escape syntax
adamziel Oct 30, 2025
f8e90c7
Use escape sequences in css-test-cases.php
adamziel Oct 30, 2025
266a0e5
Do not convert CSS numbers to PHP floats
adamziel Oct 30, 2025
b2da468
Remove this->token_value_needs_decoding
adamziel Oct 30, 2025
82c32a5
Simplify ident sequence consumption – use indexes, do not optimistica…
adamziel Oct 30, 2025
d7ef9b1
PHP 7.2 syntax adjustment
adamziel Oct 30, 2025
5cbf7f2
Brush up the test set
adamziel Oct 30, 2025
2f008a8
code style
adamziel Oct 30, 2025
c474de1
PHP 7.2 syntax adjustment
adamziel Oct 30, 2025
394a789
remove the generator script
adamziel Oct 30, 2025
8a72b92
Add attribution
adamziel Oct 30, 2025
bc2efc9
Use _wp_scan_utf8
adamziel Oct 30, 2025
bf2140a
Adjust tests
adamziel Oct 30, 2025
b1e3d77
Test invalid utf-8 sequences
adamziel Oct 30, 2025
e06f08d
Test invalid utf-8 sequences
adamziel Oct 30, 2025
b1a9283
Brush up tests
adamziel Oct 30, 2025
f0c0ec7
phpcs
adamziel Oct 30, 2025
1b7b65b
more usage examples
adamziel Oct 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/Blueprints/class-runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
use WordPress\HttpClient\Client;
use WordPress\Zip\ZipFilesystem;

use function WordPress\Encoding\utf8_is_valid_byte_stream;
use function WordPress\Encoding\_wp_has_noncharacters_fallback;
use function WordPress\Filesystem\wp_unix_sys_get_temp_dir;
use function WordPress\Zip\is_zip_file_stream;

Expand Down Expand Up @@ -383,7 +383,7 @@ private function load_blueprint() {
if ( function_exists( 'mb_check_encoding' ) ) {
$is_valid_utf8 = mb_check_encoding( $blueprint_string, 'UTF-8' );
} else {
$is_valid_utf8 = utf8_is_valid_byte_stream( $blueprint_string );
$is_valid_utf8 = ! _wp_has_noncharacters_fallback( $blueprint_string );
}

if ( ! $is_valid_utf8 ) {
Expand Down
Loading