strip possible quotes from attribute_contains() haystacks

This commit is contained in:
zotlabs 2017-02-15 11:35:36 -08:00
parent 8897c5763a
commit 5db3b71c6a

View File

@ -586,8 +586,10 @@ function photo_new_resource() {
* @return boolean true if found * @return boolean true if found
*/ */
function attribute_contains($attr, $s) { function attribute_contains($attr, $s) {
// remove quotes
$attr = str_replace([ '"',"'" ],['',''],$attr);
$a = explode(' ', $attr); $a = explode(' ', $attr);
if(count($a) && in_array($s, $a)) if($a && in_array($s, $a))
return true; return true;
return false; return false;