bugfixes: private photo embeds and search for strings with %

This commit is contained in:
friendica 2012-05-29 16:44:02 -07:00
commit 419cf91aae
4 changed files with 154 additions and 148 deletions

View file

@ -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))));