From a3e307a6d026d36e486105c7d137e834c73542a7 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Mon, 25 May 2015 20:12:18 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=98=EB=AA=BB=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=ED=95=9C=20=EC=A1=B0=EA=B1=B4=EC=8B=9D=EC=9D=84=20=EC=9D=98?= =?UTF-8?q?=EB=8F=84=EC=97=90=20=EB=A7=9E=EA=B2=8C=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/document/document.controller.php | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 57240f509..60fdb51f9 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -280,16 +280,13 @@ class documentController extends document if($obj->title == '') $obj->title = 'Untitled'; // Remove XE's own tags from the contents. $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); - if(Mobile::isFromMobilePhone()) + if(Mobile::isFromMobilePhone() && $obj->use_editor != 'Y') { - if($obj->use_editor != 'Y' && $obj->use_html != 'Y') + if($obj->use_html != 'Y') { - if($obj->use_html != 'Y') - { - $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); - } - $obj->content = nl2br($obj->content); + $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); } + $obj->content = nl2br($obj->content); } // Remove iframe and script if not a top adminisrator in the session. if($logged_info->is_admin != 'Y') $obj->content = removeHackTag($obj->content); @@ -481,16 +478,13 @@ class documentController extends document if($obj->title == '') $obj->title = 'Untitled'; // Remove XE's own tags from the contents. $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); - if(Mobile::isFromMobilePhone()) + if(Mobile::isFromMobilePhone() && $obj->use_editor != 'Y') { - if($obj->use_editor != 'Y' && $obj->use_html != 'Y') + if($obj->use_html != 'Y') { - if($obj->use_html != 'Y') - { - $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); - } - $obj->content = nl2br($obj->content); + $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); } + $obj->content = nl2br($obj->content); } // Change not extra vars but language code of the original document if document's lang_code is different from author's setting. if($source_obj->get('lang_code') != Context::getLangType())