Skip to content

Commit 34dfa75

Browse files
committed
Change escape code to preserve the escaped string after do_shortcode call
1 parent 15a0fcb commit 34dfa75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

syntaxhighlighter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ function shortcode_callback( $atts, $code = '', $tag = false ) {
13771377
$code = ( false === strpos( $code, '<' ) && false === strpos( $code, '>' ) && 2 == $this->get_code_format( $post ) ) ? strip_tags( $code ) : htmlspecialchars( $code );
13781378

13791379
// Escape shortcodes
1380-
$code = preg_replace( '/\[/', '&#91;', $code );
1380+
$code = preg_replace( '/\[/', '&#x5B;', $code );
13811381

13821382
$params[] = 'notranslate'; // For Google, see http://otto42.com/9k
13831383

0 commit comments

Comments
 (0)