[wp-trac] [WordPress Trac] #13971: "Wordpress" being turned into CamelCase "WordPress" breaks URLs

WordPress Trac wp-trac at lists.automattic.com
Sun Jun 27 21:13:02 UTC 2010


#13971: "Wordpress" being turned into CamelCase "WordPress" breaks URLs
--------------------------+-------------------------------------------------
 Reporter:  tfotherby     |       Owner:           
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  3.0.1    
Component:  Formatting    |     Version:  3.0      
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------

Comment(by ozh):

 Simpler (so maybe faster, for those concerned) regexp that seems to match
 valid HTML tags:

 {{{
 preg_replace( "/Wordpress(?!([^<]+)?>)/i", "WordPress", $text);
 }}}

 Doesn't work with dd32's example, but works ok with standard stuff like
 {{{
 Wordpress <a href="/bleh/Wordpress" class="link">Wordpress</a> <img
 src="/img/Wordpress-blue.png" />
 }}}

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


More information about the wp-trac mailing list