Ticket #26649: escaped-shortcodes-get-the-excerpt.patch
| File escaped-shortcodes-get-the-excerpt.patch, 535 bytes (added by , 4 months ago) |
|---|
-
src/wp-includes/shortcodes.php
diff --git a/src/wp-includes/shortcodes.php b/src/wp-includes/shortcodes.php index 2d19e21..3da5b67 100644
a b 305 305 function strip_shortcode_tag( $m ) { 306 306 // allow [[foo]] syntax for escaping a tag 307 307 if ( $m[1] == '[' && $m[6] == ']' ) { 308 return '[' . substr( $m[0], 2, -1 ); 308 // return escaped opening bracket to prevent expansion during get_the_excerpt 309 return '[' . substr( $m[0], 2, -1 ); 309 310 } 310 311 return $m[1] . $m[6]; 311 312 }