X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Ftags.php;h=a8bcae86dcc3783c13bbbc8ab6466517db431f1e;hb=712b3c7593a6046a0794efa6c65fd33ba4d64c43;hp=fc1b57db4b9343da5ac0e41735fd6b0eed9d96f0;hpb=35f623ae4f82ac8167ad98b38fab39e449ffa1ea;p=friendica.git diff --git a/include/tags.php b/include/tags.php index fc1b57db4b..a8bcae86dc 100644 --- a/include/tags.php +++ b/include/tags.php @@ -37,6 +37,9 @@ function create_tags_from_item($itemid) { $data = " ".$message["title"]." ".$message["body"]." ".$tags." "; + // ignore anything in a code block + $data = preg_replace('/\[code\](.*?)\[\/code\]/sm','',$data); + $tags = array(); $pattern = "/\W\#([^\[].*?)[\s'\".,:;\?!\[\]\/]/ism";