Ticket #23587: 23587_regex_delimiters.patch
File 23587_regex_delimiters.patch, 966 bytes (added by , 12 years ago) |
---|
-
wp-includes/rewrite.php
341 341 if ( !empty($url) && ($url != $request) && (strpos($match, $url) === 0) ) 342 342 $request_match = $url . '/' . $request; 343 343 344 if ( preg_match(" !^$match!", $request_match, $matches) ) {344 if ( preg_match("#^$match#", $request_match, $matches) ) { 345 345 346 346 if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$matches\[([0-9]+)\]/', $query, $varmatch ) ) { 347 347 // this is a verbose page match, lets check to be sure about it … … 351 351 352 352 // Got a match. 353 353 // Trim the query of everything up to the '?'. 354 $query = preg_replace(" !^.+\?!", '', $query);354 $query = preg_replace("#^.+\?#", '', $query); 355 355 356 356 // Substitute the substring matches into the query. 357 357 $query = addslashes(WP_MatchesMapRegex::apply($query, $matches));