Ticket #34575: shortcodes.php.diff
File shortcodes.php.diff, 967 bytes (added by , 5 years ago) |
---|
-
wp-includes/shortcodes.php
old new 335 335 $pattern = get_shortcode_regex(); 336 336 $textarr = wp_html_split( $content ); 337 337 338 $escape_code = apply_filters('safe_shortcodes_in_html_comments_cdata', true); 339 338 340 foreach ( $textarr as &$element ) { 339 341 if ( '' == $element || '<' !== $element[0] ) { 340 342 continue; … … 351 353 continue; 352 354 } 353 355 354 if ( $ignore_html || '<!--' === substr( $element, 0, 4 ) || '<![CDATA[' === substr( $element, 0, 9 )) {356 if ( $ignore_html ) { 355 357 // Encode all [ and ] chars. 356 358 $element = strtr( $element, $trans ); 357 359 continue; 358 360 } 361 362 if ( '<!--' === substr( $element, 0, 4 ) || '<![CDATA[' === substr( $element, 0, 9 ) ) { 363 if ( $escape_code ) { 364 $element = strtr( $element, $trans ); 365 } 366 367 continue; 368 } 359 369 360 370 $attributes = wp_kses_attr_parse( $element ); 361 371 if ( false === $attributes ) {