diff --git a/src/wp-includes/shortcodes.php b/src/wp-includes/shortcodes.php
index 4f2a1e7..7b3b21a 100644
|
a
|
b
|
function strip_shortcode_tag( $m ) { |
| 193 | 193 | // allow [[foo]] syntax for escaping a tag |
| 194 | | if ( $m[1] == '[' && $m[6] == ']' ) { |
| 195 | | return substr( $m[0], 1, -1 ); |
| 196 | | } |
| 197 | | return $m[1] . $m[6]; |
| | 194 | if ( $m[1] == '[' && $m[6] == ']' ) { |
| | 195 | // Return HTML entity for the left square bracket to prevent unwanted shortcode expansion. |
| | 196 | return '[' . substr( $m[0], 2, -1 ); |
| | 197 | } |
| | 198 | |
| | 199 | // Default behavior: return first and last matched characters. |
| | 200 | return $m[1] . $m[6]; |
| 198 | 201 | } |
| 199 | 202 | |
| 200 | 203 | /** |
| 201 | 204 | * Search content for shortcodes and filter shortcodes through their hooks. |
| 202 | 205 | * |
| 203 | 206 | * If there are no shortcode tags defined, then the content will be returned |
| 204 | 207 | * without any filtering. This might cause issues when using the 'get_the_excerpt' |
| 205 | 208 | * filter, so ensure shortcodes are correctly escaped. |