From 2f4c619d510e64eeda05366e485d50f490cefebe Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 12 Nov 2019 20:25:25 -0800 Subject: wildcard tag issue --- include/text.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/text.php b/include/text.php index daa3c4c94..44af40810 100644 --- a/include/text.php +++ b/include/text.php @@ -2789,6 +2789,9 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true) // select someone by attag or nick and the name passed in if(! $r) { + // strip user-supplied wildcards before running a wildcard search + $newname = str_replace('%','',$newname); + $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash WHERE xchan_addr like ('%s') AND abook_channel = %d ", dbesc(((strpos($newname,'@')) ? $newname : $newname . '@%')), -- cgit v1.2.3