에디터 모듈에 HTML 허용 설정 추가

회원 모듈에도 no html 서명을 위한 옵션 추가
This commit is contained in:
conory 2017-07-13 00:46:28 +09:00
parent f7915f8204
commit da0ad3bd39
20 changed files with 179 additions and 142 deletions

View file

@ -1246,7 +1246,43 @@ class documentModel extends document
return array_flip($this->getStatusList());
else return $lang->status_name_list;
}
/**
* Return filtered content
* @param object $obj
* @return string
*/
function filterHtml($obj)
{
$no_html = false;
$editor_config = getModel('editor')->getEditorConfig($obj->module_srl);
if ($editor_config->allow_html === 'N')
{
$no_html = true;
}
elseif (strpos($editor_config->sel_editor_colorset, 'nohtml') !== false)
{
$no_html = true;
}
elseif ($obj->use_html === 'N')
{
$no_html = true;
}
if ($no_html || $obj->use_editor === 'N' || !is_html_content($obj->content))
{
if ($no_html)
{
$obj->content = escape(strip_tags($obj->content), false);
}
$obj->content = nl2br($obj->content);
}
return $obj->content;
}
/**
* Setting sort index
* @param object $obj