[wp-trac] [WordPress Trac] #64284: Convert times/multiplication symbol (×) into the letter "x" when sanitizing titles for slugs

WordPress Trac noreply at wordpress.org
Thu Nov 27 05:15:25 UTC 2025


#64284: Convert times/multiplication symbol (×) into the letter "x" when sanitizing
titles for slugs
-------------------------------------------------+-------------------------
 Reporter:  archmaster7                          |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  7.0
Component:  Formatting                           |     Version:
 Severity:  minor                                |  Resolution:
 Keywords:  changes-requested has-patch needs-   |     Focuses:
  unit-tests                                     |
-------------------------------------------------+-------------------------
Changes (by westonruter):

 * keywords:  needs-patch => changes-requested has-patch needs-unit-tests


Comment:

 The patch [attachment:"64284.diff"] seems to have unrelated changes.

 Please open a pull request for collaboration and testing.

 Also, I'm not entirely sure that `sanitize_title_with_dashes()` is the
 right function to apply this change in, since it is not related to
 replacing characters with dashes (read: hyphens). This is with discussing.
 That said, it actually ''does'' already replace some characters to 'x':

 {{{#!php
 <?php
 // Convert &times to 'x'.
 $title = str_replace( '%c3%97', 'x', $title );
 }}}

 So this seems to be already settled.

 The relevant addition from the patch then seems to be:

 {{{#!php
 <?php
 // Add the new line to convert the multiplication sign (×) directly to "x"
 $title = str_replace( '×', 'x', $title );
 }}}


 Still, the patch replaces `wp_is_valid_utf8()` with `seems_utf8()` without
 explanation.

 This will also need unit tests.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64284#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list