From aecb165532b05e7af7a71521cf639e68a37aedc4 Mon Sep 17 00:00:00 2001 From: conory Date: Sun, 16 Jul 2017 17:12:19 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/editor/editor.model.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/modules/editor/editor.model.php b/modules/editor/editor.model.php index d22017f19..1c1948e85 100644 --- a/modules/editor/editor.model.php +++ b/modules/editor/editor.model.php @@ -934,14 +934,21 @@ class editorModel extends editor // Convert if ($converter) { - // To Text if ($converter == 'text') { - $obj->content = escape(utf8_trim(strip_tags($obj->content)), false); + // Remove Tag + $obj->content = strip_tags($obj->content); + + // Trim space + $obj->content = utf8_trim($obj->content); + + // Escape + $obj->content = escape($obj->content, false); + + // Insert HTML line + $obj->content = nl2br($obj->content); } - - // To HTML - if ($converter == 'text2html') + elseif ($converter == 'text2html') { $obj->content = Rhymix\Framework\Formatter::text2html($obj->content); }