diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-07-30 22:29:10 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-07-30 22:29:10 -0700 |
commit | acc9a8e43bac0fbb8fa8570e035850102bd57bfd (patch) | |
tree | ca2be243943e9df3b9dcfc978894e0c9be255940 /include/bbcode.php | |
parent | 4c6368d0750650ac2281d5a1b1831ca9d5b00501 (diff) | |
download | volse-hubzilla-acc9a8e43bac0fbb8fa8570e035850102bd57bfd.tar.gz volse-hubzilla-acc9a8e43bac0fbb8fa8570e035850102bd57bfd.tar.bz2 volse-hubzilla-acc9a8e43bac0fbb8fa8570e035850102bd57bfd.zip |
escape $ in events
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index ba9592a51..6fc481fff 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -926,14 +926,21 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true) { // 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 |