WordPress.org

Make WordPress Core

Changeset 11634


Ignore:
Timestamp:
06/23/09 22:10:46 (6 years ago)
Author:
ryan
Message:

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

Location:
trunk
Files:
3 edited

Legend:

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

    r11615 r11634  
    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); 
  • trunk/wp-includes/functions.php

    r11597 r11634  
    26832683            $wp_smiliessearch .= '|'; 
    26842684        } 
    2685         $wp_smiliessearch .= preg_quote($rest); 
     2685        $wp_smiliessearch .= preg_quote($rest, '/'); 
    26862686    } 
    26872687 
  • trunk/xmlrpc.php

    r11624 r11634  
    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.