mirror of
https://github.com/friendica/friendica
synced 2025-04-24 09:50:11 +00:00
Check for hashtags when storing them and eventually adding hashtag links
This commit is contained in:
parent
20208acb23
commit
ac3a4824df
2 changed files with 64 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue