1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

Fixes #1007 - toDB() was breaking {e_XXX} paths when HTML was used.

This commit is contained in:
Cameron
2015-05-14 09:20:11 -07:00
parent c73c07490b
commit 85dc35db26
2 changed files with 19 additions and 1 deletions

View File

@@ -524,6 +524,9 @@ class e_parse extends e_parser
$this->isHtml = true; $this->isHtml = true;
$data = $this->cleanHtml($data); // sanitize all html. $data = $this->cleanHtml($data); // sanitize all html.
$data = str_replace(array('%7B','%7D'),array('{','}'),$data); // fix for {e_XXX} paths.
// $data = urldecode($data); //XXX Commented out : NO LONGER REQUIRED. symptom of cleaning the HTML - urlencodes src attributes containing { and } .eg. {e_BASE} // $data = urldecode($data); //XXX Commented out : NO LONGER REQUIRED. symptom of cleaning the HTML - urlencodes src attributes containing { and } .eg. {e_BASE}
} }

View File

@@ -38,6 +38,17 @@ class e107TinyMceParser
{ {
$html = ''; $html = '';
if(!empty($_GET['debug']) && getperms('0'))
{
$debug = true; // For future use.
// $_POST['content'] = '';
// $_POST['mode'] = $_GET['mode'];
}
else
{
$debug = false;
}
if($_POST['mode'] == 'tohtml') if($_POST['mode'] == 'tohtml')
{ {
$html = $this->toHtml($_POST['content']); $html = $this->toHtml($_POST['content']);
@@ -48,7 +59,11 @@ class e107TinyMceParser
$html = $this->toBBcode($_POST['content']); $html = $this->toBBcode($_POST['content']);
} }
if($this->gzipCompression == true) if($debug == true)
{
print_a($html);
}
elseif($this->gzipCompression == true)
{ {
header('Content-Encoding: gzip'); header('Content-Encoding: gzip');
$gzipoutput = gzencode($html,6); $gzipoutput = gzencode($html,6);