mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
strip possible quotes from attribute_contains() haystacks
This commit is contained in:
parent
8897c5763a
commit
5db3b71c6a
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue