strip possible quotes from attribute_contains() haystacks
This commit is contained in:
parent
8897c5763a
commit
5db3b71c6a
@ -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;
|
||||
|
Reference in New Issue
Block a user