- Timestamp:
- 06/02/2024 03:14:35 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-tag-processor.php
r58233 r58281 16 16 * This would increase the size of the changes for some operations but leave more 17 17 * natural-looking output HTML. 18 * - Properly decode HTML character references in `get_attribute()`. PHP's19 * `html_entity_decode()` is wrong in a couple ways: it doesn't account for the20 * no-ambiguous-ampersand rule, and it improperly handles the way semicolons may21 * or may not terminate a character reference.22 18 * 23 19 * @package WordPress … … 2500 2496 */ 2501 2497 $enqueued_value = substr( $enqueued_text, $equals_at + 2, -1 ); 2502 return html_entity_decode( $enqueued_value );2498 return WP_HTML_Decoder::decode_attribute( $enqueued_value ); 2503 2499 } 2504 2500 … … 2573 2569 $raw_value = substr( $this->html, $attribute->value_starts_at, $attribute->value_length ); 2574 2570 2575 return html_entity_decode( $raw_value );2571 return WP_HTML_Decoder::decode_attribute( $raw_value ); 2576 2572 } 2577 2573 … … 2873 2869 } 2874 2870 2875 $decoded = html_entity_decode( $text, ENT_QUOTES | ENT_HTML5 | ENT_SUBSTITUTE);2871 $decoded = WP_HTML_Decoder::decode_text_node( $text ); 2876 2872 2877 2873 /*
Note: See TracChangeset
for help on using the changeset viewer.