Revert "0848f2ad3c 보완"

This reverts commit 6beae3b620.
This commit is contained in:
Kijin Sung 2018-08-26 23:21:45 +09:00
parent 6beae3b620
commit 5ecb1241ca
2 changed files with 8 additions and 7 deletions

View file

@ -363,7 +363,7 @@ class commentItem extends BaseObject
{ {
$content = cut_str($content, $strlen, '...'); $content = cut_str($content, $strlen, '...');
} }
return escape($content); return escape($content, false);
} }
/** /**
@ -388,13 +388,13 @@ class commentItem extends BaseObject
{ {
$content = $this->get('content'); $content = $this->get('content');
} }
$content = trim(utf8_normalize_spaces(html_entity_decode(strip_tags($content))));
if($strlen) if($strlen)
{ {
$content = trim(utf8_normalize_spaces(html_entity_decode(strip_tags($content))));
$content = cut_str($content, $strlen, '...'); $content = cut_str($content, $strlen, '...');
} }
return escape($content); return escape($content, false);
} }
/** /**

View file

@ -552,7 +552,7 @@ class documentItem extends BaseObject
$content = cut_str($content, $strlen, '...'); $content = cut_str($content, $strlen, '...');
} }
return escape($content); return escape($content, false);
} }
function getContentText($strlen = 0) function getContentText($strlen = 0)
@ -570,13 +570,14 @@ class documentItem extends BaseObject
$content = $this->get('content'); $content = $this->get('content');
$content = preg_replace_callback('/<(object|param|embed)[^>]*/is', array($this, '_checkAllowScriptAccess'), $content); $content = preg_replace_callback('/<(object|param|embed)[^>]*/is', array($this, '_checkAllowScriptAccess'), $content);
$content = preg_replace_callback('/<object[^>]*>/is', array($this, '_addAllowScriptAccess'), $content); $content = preg_replace_callback('/<object[^>]*>/is', array($this, '_addAllowScriptAccess'), $content);
$content = trim(utf8_normalize_spaces(html_entity_decode(strip_tags($content))));
if($strlen) if($strlen)
{ {
$content = trim(utf8_normalize_spaces(html_entity_decode(strip_tags($content))));
$content = cut_str($content, $strlen, '...'); $content = cut_str($content, $strlen, '...');
} }
return escape($content); return escape($content, false);
} }
function _addAllowScriptAccess($m) function _addAllowScriptAccess($m)