aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-07-31 15:45:13 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-07-31 15:45:13 -0700
commitc1a953f96043c63c47bff7f5294005aba077e571 (patch)
tree6d55f13bff3cb2a89ed8f55f0d2730cf3ff47f6c /include/bbcode.php
parent1d218784d180deb0946cb5dd4100ed0ebd489346 (diff)
parent5e985ef34f06964a7d8ac6ab20a8481c4b3ddca7 (diff)
downloadvolse-hubzilla-c1a953f96043c63c47bff7f5294005aba077e571.tar.gz
volse-hubzilla-c1a953f96043c63c47bff7f5294005aba077e571.tar.bz2
volse-hubzilla-c1a953f96043c63c47bff7f5294005aba077e571.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts: util/messages.po
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 2e201344c..66b63d395 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -950,14 +950,21 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
// start which is always required). Allow desc with a missing summary for compatibility.
if ((x($ev,'desc') || x($ev,'summary')) && x($ev,'start')) {
+
$sub = format_event_html($ev);
+ $sub = str_replace('$',"\0",$sub);
+
+ $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/ism",$sub,$Text);
+
$Text = preg_replace("/\[event\-summary\](.*?)\[\/event\-summary\]/ism",'',$Text);
$Text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/ism",'',$Text);
- $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/ism",$sub,$Text);
$Text = preg_replace("/\[event\-finish\](.*?)\[\/event\-finish\]/ism",'',$Text);
$Text = preg_replace("/\[event\-location\](.*?)\[\/event\-location\]/ism",'',$Text);
$Text = preg_replace("/\[event\-adjust\](.*?)\[\/event\-adjust\]/ism",'',$Text);
+
+ $Text = str_replace("\0",'$',$Text);
+
}
// Unhide all [noparse] contained bbtags unspacefying them