WordPress.org

Make WordPress Core

Ticket #19927: shortcodes.php.19927.diff

File shortcodes.php.19927.diff, 366 bytes (added by bobbingwide, 2 years ago)

patch for ticket #19927 - use [ instead of '[' to prevent further shortcode expansion

  • shortcodes.php

     
    224224 
    225225        // allow [[foo]] syntax for escaping a tag 
    226226        if ( $m[1] == '[' && $m[6] == ']' ) { 
    227                 return substr($m[0], 1, -1); 
     227                return '['.substr($m[0], 2, -1); 
    228228        } 
    229229 
    230230        $tag = $m[2];