1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-09 08:06:38 +02:00

Closes #4600, Fixes #4597 - Encoding of 'national characters' in TinyMce.

This commit is contained in:
Cameron
2021-10-19 09:10:32 -07:00
parent fe7e99f136
commit b91b1c36b0
5 changed files with 51 additions and 12 deletions

View File

@@ -183,10 +183,12 @@ TEMPL;
exit;
}
$content = html_entity_decode($content);
$text = !empty($content) ? "[html]".$content."[/html]" : ''; // Add the tags before saving to DB.
}
else // User doesn't have HTML access - bbcode Mode.
{
$content = html_entity_decode($content);
$text = e107::getBB()->htmltoBBcode($content); // not reliable enough yet.
}

View File

@@ -202,8 +202,12 @@
_e107_html2bbcode : function(s, url) {
s = tinymce.trim(s);
// return s;
if(s === '')
{
return '';
}
// console.log('html2bbcode '+ s);
var p = $.ajax({
type: "POST",
url: url + "/parser.php",
@@ -228,9 +232,13 @@
_e107_bbcode2html : function(s, url) {
s = tinymce.trim(s);
// FIXME mod-security might block the ajax call below with Rules: 942230, 949110, 980130 - reason yet unknown.
if(s === '')
{
return '';
}
// return s;
// FIXME mod-security might block the ajax call below with Rules: 942230, 949110, 980130 - reason yet unknown.
// console.log('bbcode2html '+ s);
var p = $.ajax({
type: "POST",