From cac9ef5b544c9bc30fe81dc6be30eb3aa49768d7 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 23 Feb 2013 23:09:43 -0800 Subject: [PATCH] Issue #119 - Fixes broken images, not sure if this affected the line-breaks. --- e107_plugins/tinymce/plugins/e107bbcode/parser.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/e107_plugins/tinymce/plugins/e107bbcode/parser.php b/e107_plugins/tinymce/plugins/e107bbcode/parser.php index 4e0d202c5..f480454e7 100644 --- a/e107_plugins/tinymce/plugins/e107bbcode/parser.php +++ b/e107_plugins/tinymce/plugins/e107bbcode/parser.php @@ -17,20 +17,22 @@ if($_POST['mode'] == 'tohtml') { // XXX @Cam possible fix - convert to BB first, see news admin AJAX request/response values for reference why $content = stripslashes($_POST['content']); - $content = e107::getBB()->htmltoBBcode($content); +// $content = e107::getBB()->htmltoBBcode($content); //XXX This breaks inserted images from media-manager. :/ $content = $tp->toDB($content); e107::getBB()->setClass($_SESSION['media_category']); // XXX @Cam this breaks new lines, currently we use \n instead [br] //echo $tp->toHtml(str_replace("\n","",$content), true); echo $tp->toHtml($content, true); + e107::getBB()->clearClass(); } if($_POST['mode'] == 'tobbcode') { - //echo $_POST['content']; + // echo $_POST['content']; $content = stripslashes($_POST['content']); +// $content = str_replace("../","",$content); // quick fix for image-path issue. echo e107::getBB()->htmltoBBcode($content); }