Changes in the bbcode to markdown converter to make it more compatible with Diaspora

This commit is contained in:
Michael Vogel 2012-07-15 12:47:24 +02:00
parent 8d7d46ae7a
commit 4e9086f9b0
3 changed files with 22 additions and 1 deletions

View file

@ -115,6 +115,10 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
$a = get_app();
// Move all spaces out of the tags
$Text = preg_replace("/\[(\w*)\](\s*)/ism", '$2[$1]', $Text);
$Text = preg_replace("/(\s*)\[\/(\w*)\]/ism", '[/$2]$1', $Text);
// Hide all [noparse] contained bbtags by spacefying them
// POSSIBLE BUG --> Will the 'preg' functions crash if there's an embedded image?