From ac427bbdcce25732f5b8eba189d7a10a08631cfc Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 6 Feb 2009 03:42:48 +0000 Subject: [PATCH] Require smilies to be surrounded by spaces or be at the beginning or end of the line, see #6464 git-svn-id: https://develop.svn.wordpress.org/trunk@10514 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 6fb59a4787..c63fdb0b45 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2510,7 +2510,7 @@ function smilies_init() { // new subpattern? if ($firstchar != $subchar) { if ($subchar != '') { - $wp_smiliessearch .= ')|'; + $wp_smiliessearch .= ')|(?:\s|^)'; } $subchar = $firstchar; $wp_smiliessearch .= preg_quote($firstchar, '/') . '(?:'; @@ -2520,7 +2520,7 @@ function smilies_init() { $wp_smiliessearch .= preg_quote($rest); } - $wp_smiliessearch .= ')(?:\s|$)/'; + $wp_smiliessearch .= ')(?:\s|$)/m'; } /**