From 419cf91aae555f6e42767765f476b1f1cc85e5df Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 29 May 2012 16:44:02 -0700 Subject: bugfixes: private photo embeds and search for strings with % --- mod/search.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod/search.php') diff --git a/mod/search.php b/mod/search.php index 3e6bf68aa..6d4bd07e3 100644 --- a/mod/search.php +++ b/mod/search.php @@ -110,9 +110,9 @@ function search_content(&$a) { return $o; if($tag) - $sql_extra = sprintf(" AND `item`.`tag` REGEXP '%s' ", dbesc('\\]' . preg_quote($search) . '\\[')); + $sql_extra = sprintf(" AND `item`.`tag` REGEXP '%s' ", dbesc('\\]' . protect_sprintf(preg_quote($search)) . '\\[')); else - $sql_extra = sprintf(" AND `item`.`body` REGEXP '%s' ", dbesc(preg_quote($search))); + $sql_extra = sprintf(" AND `item`.`body` REGEXP '%s' ", dbesc(protect_sprintf(preg_quote($search)))); -- cgit v1.2.3