From ef22c1a9b3d4c452144bce7b94f31050622e17d6 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 8 Oct 2012 18:04:12 +1100 Subject: prevent tag recursion on shared posts --- include/bbcode.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index e204e1cb4..b383f43b6 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -148,6 +148,10 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { $Text = str_replace("<", "<", $Text); $Text = str_replace(">", ">", $Text); + // This only matters when looking for tags - otherwise has no meaning + + $Text = preg_replace("/\[share\](.*?)\[\/share\]/ism", '$1', $Text); + // Convert new line chars to html
tags // nlbr seems to be hopelessly messed up -- cgit v1.2.3