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

git-svn-id: https://develop.svn.wordpress.org/trunk@10804 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-03-17 17:42:54 +00:00
parent fc7b52bb1a
commit 6f6ef8709a
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.
*/
function sanitize_title($title, $fallback_title = '') {
$raw_title = $title;
$title = strip_tags($title);
$title = apply_filters('sanitize_title', $title);
$title = apply_filters('sanitize_title', $title, $raw_title);
if ( '' === $title || false === $title )
$title = $fallback_title;