From 91b74efae1f7acc92ebd0cff42573d2fad58c005 Mon Sep 17 00:00:00 2001 From: rboren 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: http://svn.automattic.com/wordpress/trunk@1462 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 {