Make WordPress Core


Ignore:
Timestamp:
08/25/2017 11:27:55 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Formatting: In sanitize_title_with_dashes(), convert forward slash to hyphen on save.

Props corvidism, jtsternberg, GhostToast, alxndr.
Fixes #10792.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r41109 r41318  
    20012001        // Convert nbsp, ndash and mdash HTML entities to hyphens
    20022002        $title = str_replace( array( ' ', ' ', '–', '–', '—', '—' ), '-', $title );
     2003        // Convert forward slash to hyphen
     2004        $title = str_replace( '/', '-', $title );
    20032005
    20042006        // Strip these characters entirely
Note: See TracChangeset for help on using the changeset viewer.