preg_quote() the permalink structure so that regex special chars such as dots are correctly handled. Props SergeyBiryukov. fixes #21167

git-svn-id: https://develop.svn.wordpress.org/trunk@22365 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2012-11-05 14:13:29 +00:00
parent 41697f3910
commit 38b29deb8e
1 changed files with 2 additions and 0 deletions

View File

@ -1251,6 +1251,8 @@ class WP_Rewrite {
}
}
$permalink_structure = preg_quote( $permalink_structure );
//get everything up to the first rewrite tag
$front = substr($permalink_structure, 0, strpos($permalink_structure, '%'));
//build an array of the tags (note that said array ends up being in $tokens[0])