[geeklog-cvs] Geeklog-1.x/public_html lib-common.php,1.718,1.719
Dirk Haun
dhaun at qs1489.pair.com
Mon Aug 11 03:50:26 EDT 2008
Update of /cvsroot/geeklog/Geeklog-1.x/public_html
In directory qs1489.pair.com:/tmp/cvs-serv3764/public_html
Modified Files:
lib-common.php
Log Message:
Fixed error when attempting to highlight a search query that contained a slash
Index: lib-common.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/lib-common.php,v
retrieving revision 1.718
retrieving revision 1.719
diff -C2 -d -r1.718 -r1.719
*** lib-common.php 4 Aug 2008 09:34:43 -0000 1.718
--- lib-common.php 11 Aug 2008 07:50:23 -0000 1.719
***************
*** 5716,5719 ****
--- 5716,5720 ----
{
$searchword = preg_quote( str_replace( "'", "\'", $searchword ));
+ $searchword = str_replace('/', '\\/', $searchword);
$text = preg_replace( '/(\>(((?>[^><]+)|(?R))*)\<)/ie', "preg_replace('/(?>$searchword+)/i','<span class=\"highlight\">\\\\0</span>','\\0')", '<!-- x -->' . $text . '<!-- x -->' );
}
More information about the geeklog-cvs
mailing list