Fix #769 #1359 remove problematic characters in board module

This commit is contained in:
Kijin Sung 2020-07-31 15:03:24 +09:00
parent a740f39538
commit 4c9f2ec3a1
4 changed files with 44 additions and 0 deletions

View file

@ -32,6 +32,23 @@ class boardController extends board
$obj->module_srl = $this->module_srl;
$obj->commentStatus = $obj->comment_status;
// Remove disallowed Unicode symbols.
if ($this->module_info->filter_specialchars !== 'N')
{
if (isset($obj->title))
{
$obj->title = utf8_clean($obj->title);
}
if (isset($obj->content))
{
$obj->content = utf8_clean($obj->content);
}
if (isset($obj->tags))
{
$obj->tags = utf8_clean($obj->tags);
}
}
// Return error if content is empty.
if (is_empty_html_content($obj->content))
{
@ -371,6 +388,15 @@ class boardController extends board
$obj = Context::getRequestVars();
$obj->module_srl = $this->module_srl;
// Remove disallowed Unicode symbols.
if ($this->module_info->filter_specialchars !== 'N')
{
if (isset($obj->content))
{
$obj->content = utf8_clean($obj->content);
}
}
// Return error if content is empty.
if (is_empty_html_content($obj->content))
{