diff options
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/text.php b/include/text.php index 8adcc1269..54ad9ec7a 100644 --- a/include/text.php +++ b/include/text.php @@ -1574,7 +1574,7 @@ function format_hashtags(&$item) { continue; if(empty($t['url'])) continue; - if(strpos($item['body'], $t['url']) || strpos($item['body'], '#' . $t['term'])) + if(strpos($item['body'], $t['url']) || stripos($item['body'], '#' . $t['term'])) continue; if($s) $s .= ' '; @@ -3107,6 +3107,15 @@ function item_url_replace($channel,&$item,$old,$new,$oldnick = '') { if($oldnick) $item['llink'] = str_replace('/' . $oldnick . '/' ,'/' . $channel['channel_address'] . '/' ,$item['llink']); + if($item['term']) { + for($x = 0; $x < count($item['term']); $x ++) { + $item['term'][$x]['url'] = str_replace($old,$new,$item['term'][$x]['url']); + if ($oldnick) { + $item['term'][$x]['url'] = str_replace('/' . $oldnick . '/' ,'/' . $channel['channel_address'] . '/' ,$item['term'][$x]['url']); + } + } + } + } |