diff options
author | zotlabs <mike@macgirvin.com> | 2017-02-15 11:35:36 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-02-15 11:35:36 -0800 |
commit | 5db3b71c6aad7b27e440dcf32978b9a5d39b97b3 (patch) | |
tree | 52cd361d9e591c457c00e67801f26046c1dce6fb /include/text.php | |
parent | 8897c5763a794696cc58e1547ce7811b3b6800e0 (diff) | |
download | volse-hubzilla-5db3b71c6aad7b27e440dcf32978b9a5d39b97b3.tar.gz volse-hubzilla-5db3b71c6aad7b27e440dcf32978b9a5d39b97b3.tar.bz2 volse-hubzilla-5db3b71c6aad7b27e440dcf32978b9a5d39b97b3.zip |
strip possible quotes from attribute_contains() haystacks
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 4 |
1 files changed, 3 insertions, 1 deletions
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; |