WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #20399


Ignore:
Timestamp:
04/09/2012 08:01:11 PM (6 years ago)
Author:
johnbillion
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20399 – Description

    initial v1  
    33I have tracked this down to line 892 of /wp-includes/formatting.php which is:
    44
    5 $title = preg_replace('|-+|', '-', $title);
     5`$title = preg_replace('|-+|', '-', $title);`
    66
    77and so it replaces more than 1 consecutive occurance of - with a single -.  And this is as the point the code checks the database.  Thus a URL e.g. "colin---wiseman---2012" gets changed to "colin-wiseman-2012" which is not a name of a post in the database.