mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-09 21:42:10 +09:00
* pr/1371: check manual inserted document check manual inserted comment fix line break bug document fix line break bug comment nl2br content document nl2br content comment Update xe_textarea.min.js Update xe_textarea.js check nohtml editor document check nohtml editor comment
This commit is contained in:
commit
d92311fce0
4 changed files with 41 additions and 2 deletions
|
|
@ -289,6 +289,16 @@ class documentController extends document
|
|||
}
|
||||
$obj->content = nl2br($obj->content);
|
||||
}
|
||||
else
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$editor_config = $oModuleModel->getModuleConfig('editor');
|
||||
|
||||
if(substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0 && !$manual_inserted)
|
||||
{
|
||||
$obj->content = preg_replace('/\r|\n/', '', nl2br(htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)));
|
||||
}
|
||||
}
|
||||
// Remove iframe and script if not a top adminisrator in the session.
|
||||
if($logged_info->is_admin != 'Y') $obj->content = removeHackTag($obj->content);
|
||||
// An error appears if both log-in info and user name don't exist.
|
||||
|
|
@ -489,6 +499,16 @@ class documentController extends document
|
|||
}
|
||||
$obj->content = nl2br($obj->content);
|
||||
}
|
||||
else
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$editor_config = $oModuleModel->getModuleConfig('editor');
|
||||
|
||||
if(substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0)
|
||||
{
|
||||
$obj->content = preg_replace('/\r|\n/', '', nl2br(htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)));
|
||||
}
|
||||
}
|
||||
// Change not extra vars but language code of the original document if document's lang_code is different from author's setting.
|
||||
if($source_obj->get('lang_code') != Context::getLangType())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue