]> git.mxchange.org Git - friendica.git/blobdiff - include/text.php
Check for hashtags when storing them and eventually adding hashtag links
[friendica.git] / include / text.php
index c33dd79952d8015dc38583e495ef93c9a89583de..be74756cd447ffe18e8a854cec15ac6b13d17bea 100644 (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);