aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-02-15 11:35:36 -0800
committerzotlabs <mike@macgirvin.com>2017-02-15 11:35:36 -0800
commit5db3b71c6aad7b27e440dcf32978b9a5d39b97b3 (patch)
tree52cd361d9e591c457c00e67801f26046c1dce6fb
parent8897c5763a794696cc58e1547ce7811b3b6800e0 (diff)
downloadvolse-hubzilla-5db3b71c6aad7b27e440dcf32978b9a5d39b97b3.tar.gz
volse-hubzilla-5db3b71c6aad7b27e440dcf32978b9a5d39b97b3.tar.bz2
volse-hubzilla-5db3b71c6aad7b27e440dcf32978b9a5d39b97b3.zip
strip possible quotes from attribute_contains() haystacks
-rw-r--r--include/text.php4
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;