Formatting: Correctly encode ASCII characters in post slugs.

Props zieladam, whyisjake, xknown, peterwilsoncc, desrosj, iandunn.

git-svn-id: https://develop.svn.wordpress.org/trunk@52457 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers
2022-01-06 17:08:18 +00:00
parent bc34e6fb13
commit 6223e0cf1e
2 changed files with 12 additions and 7 deletions
+1 -1
View File
@@ -5142,7 +5142,7 @@ function _truncate_post_slug( $slug, $length = 200 ) {
if ( $decoded_slug === $slug ) {
$slug = substr( $slug, 0, $length );
} else {
$slug = utf8_uri_encode( $decoded_slug, $length );
$slug = utf8_uri_encode( $decoded_slug, $length, true );
}
}