Make WordPress Core

Changeset 11635


Ignore:
Timestamp:
06/23/2009 10:11:05 PM (15 years ago)
Author:
ryan
Message:

Pass delimiter to preg_quote(). Props Denis-de-Bernardy. see #9955

Location:
branches/2.8
Files:
3 edited

Legend:

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

    r11616 r11635  
    8181
    8282function wptexturize_pushpop_element($text, &$stack, $disabled_elements, $opening = '<', $closing = '>') {
    83     $o = preg_quote($opening);
    84     $c = preg_quote($closing);
     83    $o = preg_quote($opening, '/');
     84    $c = preg_quote($closing, '/');
    8585    foreach($disabled_elements as $element) {
    8686        if (preg_match('/^'.$o.$element.'\b/', $text)) array_push($stack, $element);
  • branches/2.8/wp-includes/functions.php

    r11598 r11635  
    26832683            $wp_smiliessearch .= '|';
    26842684        }
    2685         $wp_smiliessearch .= preg_quote($rest);
     2685        $wp_smiliessearch .= preg_quote($rest, '/');
    26862686    }
    26872687
  • branches/2.8/xmlrpc.php

    r11625 r11635  
    33013301        $p = explode( "\n\n", $linea );
    33023302
    3303         $preg_target = preg_quote($pagelinkedto);
     3303        $preg_target = preg_quote($pagelinkedto, '|');
    33043304
    33053305        foreach ( $p as $para ) {
     
    33233323                $excerpt = strip_tags($excerpt, '<wpcontext>');        // strip all tags but our context marker
    33243324                $excerpt = trim($excerpt);
    3325                 $preg_marker = preg_quote($marker);
     3325                $preg_marker = preg_quote($marker, '|');
    33263326                $excerpt = preg_replace("|.*?\s(.{0,100}$preg_marker.{0,100})\s.*|s", '$1', $excerpt);
    33273327                $excerpt = strip_tags($excerpt); // YES, again, to remove the marker wrapper
Note: See TracChangeset for help on using the changeset viewer.