Skip to content

Commit

Permalink
Call slugify
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsnell committed Jul 1, 2024
1 parent 19cf620 commit e13d441
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wp-includes/formatting.php
Original file line number Diff line number Diff line change
Expand Up @@ -2709,6 +2709,10 @@ function slugify( string $sluggee ): string {
* @return string The sanitized title.
*/
function sanitize_title_with_dashes( $title, $raw_title = '', $context = 'display' ) {
if ( 'display' === $context ) {
return slugify( $title );
}

$title = strip_tags( $title );
// Preserve escaped octets.
$title = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title );
Expand Down

0 comments on commit e13d441

Please sign in to comment.