[wp-cvs] wordpress/wp-includes functions.php,1.215,1.216
Ryan Boren
rboren at users.sourceforge.net
Sun Nov 28 05:24:12 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32080
Modified Files:
functions.php
Log Message:
Use preg_quote() to make spam words regex safe.
Index: functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/functions.php,v
retrieving revision 1.215
retrieving revision 1.216
diff -C2 -d -r1.215 -r1.216
*** functions.php 25 Nov 2004 16:23:24 -0000 1.215
--- functions.php 28 Nov 2004 05:24:09 -0000 1.216
***************
*** 1733,1737 ****
// Do some escaping magic so that '#' chars in the
// spam words don't break things:
! $word = preg_replace('/(\\\\|#)/','\\\\$1',$word);
$pattern = "#$word#i";
--- 1733,1737 ----
// Do some escaping magic so that '#' chars in the
// spam words don't break things:
! $word = preg_quote($word, '#');
$pattern = "#$word#i";
More information about the cvs
mailing list