From 5db3b71c6aad7b27e440dcf32978b9a5d39b97b3 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 15 Feb 2017 11:35:36 -0800 Subject: strip possible quotes from attribute_contains() haystacks --- include/text.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index cfec1ddf6..eb8147f9a 100644 --- a/include/text.php +++ b/include/text.php @@ -586,8 +586,10 @@ function photo_new_resource() { * @return boolean true if found */ function attribute_contains($attr, $s) { + // remove quotes + $attr = str_replace([ '"',"'" ],['',''],$attr); $a = explode(' ', $attr); - if(count($a) && in_array($s, $a)) + if($a && in_array($s, $a)) return true; return false; -- cgit v1.2.3