mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-26 19:18:57 +01:00
b342d5c7b8
A fix was introduced to the Tag Processor to ensure that contiguous text in an HTML document emerges as a single text node spanning the full sequence. Unfortunately, that patch was marginally over-zealous in checking if a "<" started a syntax token or not. It used the following: {{{ <?php if ( 'A' <= $c && 'z' >= $c ) { ... } }}} This was based on the assumption that the A-Z and a-z letters are contiguous in the ASCII range; they aren't, and there's a gap of several characters in between. The result of this is that in some cases the parser created a text boundary when it didn't need to. Text boundaries can be surprising and can be created when reaching invalid syntax, HTML comments, and more hidden elements, so semantically this wasn't a major bug, but it was an aesthetic challenge. In this patch the check is properly compared for both upper- and lower-case variants that could potentially form tag names. {{{ <?php if ( ( 'A' <= $c && 'Z' >= $c ) || ( 'a' <= $c && 'z' >= $c ) ) { ... } }}} This solves the problem and ensures that contiguous text appears as a single text node when scanning tokens. Developed in https://github.com/WordPress/wordpress-develop/pull/6041 Discussed in https://core.trac.wordpress.org/ticket/60385 Follow-up to [57489] Props dmsnell, jonsurrell Fixes #60385 Built from https://develop.svn.wordpress.org/trunk@57542 git-svn-id: http://core.svn.wordpress.org/trunk@57043 1a063a9b-81f0-0310-95a4-ce76da25c4cd |
||
---|---|---|
.. | ||
class-wp-html-active-formatting-elements.php | ||
class-wp-html-attribute-token.php | ||
class-wp-html-open-elements.php | ||
class-wp-html-processor-state.php | ||
class-wp-html-processor.php | ||
class-wp-html-span.php | ||
class-wp-html-tag-processor.php | ||
class-wp-html-text-replacement.php | ||
class-wp-html-token.php | ||
class-wp-html-unsupported-exception.php |