Pass the unprocessed title to the sanitize_title filter. Props chineseleper. fixes #8981 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@10804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-03-17 17:42:54 +00:00
parent 4f130b5e47
commit 8e26610a07
1 changed files with 2 additions and 1 deletions

View File

@ -636,8 +636,9 @@ function sanitize_user( $username, $strict = false ) {
* @return string The sanitized string. * @return string The sanitized string.
*/ */
function sanitize_title($title, $fallback_title = '') { function sanitize_title($title, $fallback_title = '') {
$raw_title = $title;
$title = strip_tags($title); $title = strip_tags($title);
$title = apply_filters('sanitize_title', $title); $title = apply_filters('sanitize_title', $title, $raw_title);
if ( '' === $title || false === $title ) if ( '' === $title || false === $title )
$title = $fallback_title; $title = $fallback_title;