Changeset 55651 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 04/14/2023 01:25:36 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r55642 r55651 4525 4525 * @since 1.2.2 4526 4526 * 4527 * @param string $ myHTMLThe text to be converted.4527 * @param string $text The text to be converted. 4528 4528 * @return string Converted text. 4529 4529 */ 4530 function htmlentities2( $myHTML ) { 4531 $translation_table = get_html_translation_table( HTML_ENTITIES, ENT_QUOTES ); 4530 function htmlentities2( $text ) { 4531 $translation_table = get_html_translation_table( HTML_ENTITIES, ENT_QUOTES ); 4532 4532 4533 $translation_table[ chr( 38 ) ] = '&'; 4533 return preg_replace( '/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/', '&', strtr( $myHTML, $translation_table ) ); 4534 4535 return preg_replace( '/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/', '&', strtr( $text, $translation_table ) ); 4534 4536 } 4535 4537
Note: See TracChangeset
for help on using the changeset viewer.