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

WordPress Trac wp-trac at lists.automattic.com
Sun Apr 18 08:23:59 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:  ampersand the_title_attribute htmlspecialchars
---------------------------+------------------------------------------------

Comment(by dd32):

 Could that be changed to :
 {{{
 $title = preg_replace('/&[a-z0-9]+?;/', '', $title); // kill entities
 }}}

 perhaps? That'd still catch all valid entities...

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


More information about the wp-trac mailing list