Remove % from title before utf8 uri encoding is done.
git-svn-id: http://svn.automattic.com/wordpress/trunk@2036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
87568fbb50
commit
72430a4584
|
@ -217,6 +217,7 @@ function sanitize_title($title, $fallback_title = '') {
|
||||||
|
|
||||||
function sanitize_title_with_dashes($title) {
|
function sanitize_title_with_dashes($title) {
|
||||||
$title = strip_tags($title);
|
$title = strip_tags($title);
|
||||||
|
$title = preg_replace('|%|', '', $title);
|
||||||
$title = remove_accents($title);
|
$title = remove_accents($title);
|
||||||
if (seems_utf8($title)) {
|
if (seems_utf8($title)) {
|
||||||
if (function_exists('mb_strtolower')) {
|
if (function_exists('mb_strtolower')) {
|
||||||
|
@ -227,7 +228,7 @@ function sanitize_title_with_dashes($title) {
|
||||||
|
|
||||||
$title = strtolower($title);
|
$title = strtolower($title);
|
||||||
$title = preg_replace('/&.+?;/', '', $title); // kill entities
|
$title = preg_replace('/&.+?;/', '', $title); // kill entities
|
||||||
$title = preg_replace('/[^a-z0-9 _-]/', '', $title);
|
$title = preg_replace('/[^%a-z0-9 _-]/', '', $title);
|
||||||
$title = preg_replace('/\s+/', '-', $title);
|
$title = preg_replace('/\s+/', '-', $title);
|
||||||
$title = preg_replace('|-+|', '-', $title);
|
$title = preg_replace('|-+|', '-', $title);
|
||||||
$title = trim($title, '-');
|
$title = trim($title, '-');
|
||||||
|
|
Loading…
Reference in New Issue