Make WordPress Core


Ignore:
Timestamp:
03/31/2008 07:56:58 AM (17 years ago)
Author:
markjaquith
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r7520 r7581  
    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.