Making WordPress.org


Ignore:
Timestamp:
05/04/2021 04:25:36 AM (6 years ago)
Author:
dd32
Message:

Handbooks/HelpHub: Replace accented characters before converting a title into a slug for use as page anchors. Take Two.

This time use sanitize_title() so that sanitize_title_with_dashes() gets called with save context rather than display which properly strips any remaining entities.

Follow up to [10920].
Fixes #5711.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/table-of-contents.php

    r10938 r10945  
    131131                                $last_item = $item[2];
    132132
    133                                 $id = sanitize_title_with_dashes( remove_accents( $item[3] ) );
     133                                $id = sanitize_title( $item[3] );
    134134                                // Append unique suffix if anchor ID isn't unique.
    135135                                $count = 2;
    … …  
    159159                        $replacement = '';
    160160                        $matches[] = $item[0];
    161                         $id = sanitize_title_with_dashes( remove_accents( $item[2] ) );
     161                        $id = sanitize_title( $item[2] );
    162162
    163163                        // Append unique suffix if anchor ID isn't unique.
Note: See TracChangeset for help on using the changeset viewer.