Replace eval usage in request processing with new WP_MatchesMapRegex() class usage. See #9602 props hakre.

git-svn-id: https://develop.svn.wordpress.org/trunk@11853 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood
2009-08-20 20:09:36 +00:00
parent 50bb241850
commit 885fce4ea9
2 changed files with 93 additions and 3 deletions

View File

@@ -299,7 +299,7 @@ function url_to_postid($url) {
$query = preg_replace("!^.+\?!", '', $query);
// Substitute the substring matches into the query.
eval("\$query = \"" . addslashes($query) . "\";");
$query = addslashes(WP_MatchesMapRegex::apply($query, $matches));
// Filter out non-public query vars
global $wp;
parse_str($query, $query_vars);