mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
check nohtml editor comment
This commit is contained in:
parent
e308a5035b
commit
5f986dd7fb
1 changed files with 20 additions and 0 deletions
|
|
@ -326,6 +326,16 @@ class commentController extends comment
|
|||
}
|
||||
$obj->content = nl2br($obj->content);
|
||||
}
|
||||
else
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$editor_config = $oModuleModel->getModuleConfig('editor');
|
||||
|
||||
if(substr_compare($editor_config->sel_comment_editor_colorset, 'nohtml', -6) === 0)
|
||||
{
|
||||
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
}
|
||||
}
|
||||
|
||||
if(!$obj->regdate)
|
||||
{
|
||||
|
|
@ -729,6 +739,16 @@ class commentController extends comment
|
|||
}
|
||||
$obj->content = nl2br($obj->content);
|
||||
}
|
||||
else
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$editor_config = $oModuleModel->getModuleConfig('editor');
|
||||
|
||||
if(substr_compare($editor_config->sel_comment_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 administrator on the session
|
||||
if($logged_info->is_admin != 'Y')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue