Check for hashtags when storing them and eventually adding hashtag links

This commit is contained in:
Michael Vogel 2015-03-01 17:33:55 +01:00
parent 20208acb23
commit ac3a4824df
2 changed files with 64 additions and 0 deletions

View file

@ -752,6 +752,9 @@ if(! function_exists('get_tags')) {
function get_tags($s) {
$ret = array();
// Convert hashtag links to hashtags
$s = preg_replace("/#\[url\=([^\[\]]*)\](.*?)\[\/url\]/ism", "#$2", $s);
// ignore anything in a code block
$s = preg_replace('/\[code\](.*?)\[\/code\]/sm','',$s);