[wp-trac] [WordPress Trac] #10823: Bad handling of ampersand in post titles

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 27 10:54:28 UTC 2010


#10823: Bad handling of ampersand in post titles
---------------------------+------------------------------------------------
 Reporter:  Commeuneimage  |       Owner:                         
     Type:  defect (bug)   |      Status:  new                    
 Priority:  normal         |   Milestone:  3.0                    
Component:  Formatting     |     Version:  2.8.4                  
 Severity:  minor          |    Keywords:  has-patch needs-testing
---------------------------+------------------------------------------------

Comment(by pufuwozu):

 Sorry to be pedantic but that patch introduces a slight regression for
 cases such as × (the permalinks would include "215").

 Maybe we should include the hash character in the regex, like so:

 {{{
 $title = preg_replace('/&[#a-z0-9]+?;/', '', $title); // kill entities
 }}}

 After that, I can't think of any other cases.

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


More information about the wp-trac mailing list