From a98d2ee3872ac422ea2e45d2f2023f76d65ad60b Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Sun, 22 Mar 2015 17:12:51 +0100 Subject: [PATCH] ignore tags inside code block should fix issue #1041 --- include/tags.php | 3 +++ 1 file changed, 3 insertions(+) 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";