[wp-cvs] wordpress/wp-content/plugins google-hilite.php,1.5,1.6
Ryan Boren
rboren at users.sourceforge.net
Tue Jul 13 18:14:56 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-content/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3840
Modified Files:
google-hilite.php
Log Message:
preg_quote search terms. http://mosquito.wordpress.org/bug_view_page.php?bug_id=0000123
Index: google-hilite.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-content/plugins/google-hilite.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** google-hilite.php 1 Jun 2004 02:18:36 -0000 1.5
--- google-hilite.php 13 Jul 2004 18:14:54 -0000 1.6
***************
*** 105,108 ****
--- 105,109 ----
foreach ($query_terms as $term) {
if (!empty($term) && $term != ' ') {
+ $term = preg_quote($term, '/');
if (!preg_match('/<.+>/',$text)) {
$text = preg_replace('/(\b'.$term.'\b)/i','<span class="hilite">$1</span>',$text);
More information about the cvs
mailing list