From 918aabfbd517bf8bb41dcd2a7a1194ec02e4ebc6 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 13 Jul 2004 18:14:54 +0000 Subject: [PATCH] preg_quote search terms. http://mosquito.wordpress.org/bug_view_page.php?bug_id=0000123 git-svn-id: https://develop.svn.wordpress.org/trunk@1462 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-content/plugins/google-hilite.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-content/plugins/google-hilite.php b/wp-content/plugins/google-hilite.php index 038d9376ab..b179159808 100644 --- a/wp-content/plugins/google-hilite.php +++ b/wp-content/plugins/google-hilite.php @@ -104,6 +104,7 @@ function hilite($text) { $query_terms = get_search_query_terms($engine); foreach ($query_terms as $term) { if (!empty($term) && $term != ' ') { + $term = preg_quote($term, '/'); if (!preg_match('/<.+>/',$text)) { $text = preg_replace('/(\b'.$term.'\b)/i','$1',$text); } else {