Make WordPress Core


Ignore:
Timestamp:
04/03/2008 03:15:06 AM (19 years ago)
Author:
markjaquith
Message:

Parse shortcodes AFTER wpautop() to avoid mangling. Have wptexturize() ignore shortcodes so quotes stay straight. fixes #6444 for 2.5.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/wp-includes/formatting.php

    r7593 r7594  
    66        $output = '';
    77        $curl = '';
    8         $textarr = preg_split('/(<.*>)/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
     8        $textarr = preg_split('/(<.*>|\[.*\])/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
    99        $stop = count($textarr);
    1010
    … …  
    2727                $curl = $textarr[$i];
    2828
    29                 if (isset($curl{0}) && '<' != $curl{0} && $next) { // If it's not a tag
     29                if (isset($curl{0}) && '<' != $curl{0} && '[' != $curl{0} && $next) { // If it's not a tag
    3030                        // static strings
    3131                        $curl = str_replace($static_characters, $static_replacements, $curl);
Note: See TracChangeset for help on using the changeset viewer.