From 00d2b583588ea1c55e9b478809e8041d6ba98639 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 23 Jan 2011 16:29:30 -0800 Subject: fix a few issues with code blocks, ignore tags within blocks, fold multi-line blocks to one, also turn html br into two LFs. --- boot.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 05b33abd6..45fd8d16f 100644 --- a/boot.php +++ b/boot.php @@ -1687,6 +1687,11 @@ function activity_match($haystack,$needle) { if(! function_exists('get_tags')) { function get_tags($s) { $ret = array(); + + // ignore anything in a code block + + $s = preg_replace('/\[code\](.*?)\[\/code\]/sm','',$s); + if(preg_match_all('/([@#][^ \x0D\x0A,:?]*)([ \x0D\x0A,:?]|$)/',$s,$match)) { foreach($match[1] as $match) { if(strstr($match,"]")) { -- cgit v1.2.3