1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 12:48:26 +02:00

Issue #119 - Fixes broken images, not sure if this affected the line-breaks.

This commit is contained in:
Cameron
2013-02-23 23:09:43 -08:00
parent 231f062e9a
commit cac9ef5b54

View File

@@ -17,13 +17,14 @@ if($_POST['mode'] == 'tohtml')
{ {
// XXX @Cam possible fix - convert to BB first, see news admin AJAX request/response values for reference why // XXX @Cam possible fix - convert to BB first, see news admin AJAX request/response values for reference why
$content = stripslashes($_POST['content']); $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); $content = $tp->toDB($content);
e107::getBB()->setClass($_SESSION['media_category']); e107::getBB()->setClass($_SESSION['media_category']);
// XXX @Cam this breaks new lines, currently we use \n instead [br] // XXX @Cam this breaks new lines, currently we use \n instead [br]
//echo $tp->toHtml(str_replace("\n","",$content), true); //echo $tp->toHtml(str_replace("\n","",$content), true);
echo $tp->toHtml($content, true); echo $tp->toHtml($content, true);
e107::getBB()->clearClass(); e107::getBB()->clearClass();
} }
@@ -31,6 +32,7 @@ if($_POST['mode'] == 'tobbcode')
{ {
// echo $_POST['content']; // echo $_POST['content'];
$content = stripslashes($_POST['content']); $content = stripslashes($_POST['content']);
// $content = str_replace("../","",$content); // quick fix for image-path issue.
echo e107::getBB()->htmltoBBcode($content); echo e107::getBB()->htmltoBBcode($content);
} }