Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/wp-includes/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ function do_shortcode_tag( $m ) {

// Allow [[foo]] syntax for escaping a tag.
if ( '[' === $m[1] && ']' === $m[6] ) {
return substr( $m[0], 1, -1 );
return '[' . substr( $m[0], 2, -1 );
}

$tag = $m[2];
Expand Down Expand Up @@ -757,7 +757,7 @@ function strip_shortcodes( $content ) {
function strip_shortcode_tag( $m ) {
// Allow [[foo]] syntax for escaping a tag.
if ( '[' === $m[1] && ']' === $m[6] ) {
return substr( $m[0], 1, -1 );
return '[' . substr( $m[0], 2, -1 );
}

return $m[1] . $m[6];
Expand Down
Loading