[wp-trac] [WordPress Trac] #23587: url_to_postid() needs to use # or @ for preg_match start/end character

WordPress Trac noreply at wordpress.org
Sat Mar 2 17:28:06 UTC 2013


#23587: url_to_postid() needs to use # or @ for preg_match start/end character
---------------------------+--------------------
 Reporter:  coreygilmore   |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  3.6
Component:  Rewrite Rules  |     Version:  1.5.2
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |
---------------------------+--------------------
Changes (by stevenkword):

 * keywords:  needs-patch => has-patch


Comment:

 Attached a patch that replaces the regular expression delimiters of "!"
 with "#" for an instance of preg_match.  I also noticed the same pattern
 with an instance of preg_replace and performed the same substituion.  This
 was done to allow for regular expressions containing the "!" character.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23587#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list