mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
check nohtml editor document
This commit is contained in:
parent
5f986dd7fb
commit
c57e92c8dd
1 changed files with 20 additions and 0 deletions
|
|
@ -288,6 +288,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 = 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.
|
||||
|
|
@ -486,6 +496,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 = 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