diff options
author | zotlabs <mike@macgirvin.com> | 2019-07-28 20:00:14 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-07-28 20:00:14 -0700 |
commit | 70e4a2c4fa69135dea97d1b6323fe6f8e17961c7 (patch) | |
tree | 38e8f097ec0d9aecb12dcce0bfcf239af37cebbf /include/text.php | |
parent | 696359daba11c51d8f733dfa173e48b5e1de69ef (diff) | |
parent | 5695350e98a8a2c802ff419c5b29b0f01f0180df (diff) | |
download | volse-hubzilla-70e4a2c4fa69135dea97d1b6323fe6f8e17961c7.tar.gz volse-hubzilla-70e4a2c4fa69135dea97d1b6323fe6f8e17961c7.tar.bz2 volse-hubzilla-70e4a2c4fa69135dea97d1b6323fe6f8e17961c7.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/text.php b/include/text.php index a49ff5a29..572b43916 100644 --- a/include/text.php +++ b/include/text.php @@ -1572,7 +1572,9 @@ function format_hashtags(&$item) { $term = htmlspecialchars($t['term'], ENT_COMPAT, 'UTF-8', false) ; if(! trim($term)) continue; - if($t['url'] && strpos($item['body'], $t['url'])) + if(empty($t['url'])) + continue; + if(strpos($item['body'], $t['url']) || strpos($item['body'], '#' . $t['term'])) continue; if($s) $s .= ' '; @@ -2456,8 +2458,8 @@ function magic_link($s) { * @param boolean $escape (optional) default false */ function stringify_array_elms(&$arr, $escape = false) { - for($x = 0; $x < count($arr); $x ++) - $arr[$x] = "'" . (($escape) ? dbesc($arr[$x]) : $arr[$x]) . "'"; + foreach($arr as $k => $v) + $arr[$k] = "'" . (($escape) ? dbesc($v) : $v) . "'"; } |