From d671abf949905ff0099fb9eeef5ad189a8295fdb Mon Sep 17 00:00:00 2001 From: misol Date: Fri, 22 May 2009 05:24:06 +0000 Subject: [PATCH] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=EC=97=90=EC=84=9C=20=EC=A0=9C=EB=AA=A9=20=EC=A0=9C?= =?UTF-8?q?=EB=8C=80=EB=A1=9C=20=ED=91=9C=EC=8B=9C=20=EC=95=88=EB=90=98?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95.=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=EC=97=90=20=EC=9E=88=EB=8D=98=20=EC=9D=98?= =?UTF-8?q?=EB=AF=B8=EC=97=86=EB=8A=94=20=EB=9D=84=EC=96=B4=EC=93=B0?= =?UTF-8?q?=EA=B8=B0=20=EC=A7=80=EC=9B=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6352 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- addons/mobile/classes/mhtml.class.php | 9 ++++++--- addons/mobile/classes/mobile.class.php | 17 ++++++++++------- addons/mobile/classes/wml.class.php | 7 +++++-- modules/board/board.wap.php | 2 +- .../skins/xe_official/login_form.html | 4 ++-- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/addons/mobile/classes/mhtml.class.php b/addons/mobile/classes/mhtml.class.php index b34a7f9cb..adc93ee58 100644 --- a/addons/mobile/classes/mhtml.class.php +++ b/addons/mobile/classes/mhtml.class.php @@ -16,13 +16,16 @@ * @brief hdml 헤더 출력 **/ function printHeader() { - print("\n"); + print("\n"); + if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); + printf("%s%s\n", htmlspecialchars($this->title),htmlspecialchars($titlePageStr)); } // 제목을 출력 function printTitle() { if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); - printf('<%s%s>
%s', $this->title,$titlePageStr,"\n"); + $this->title = str_replace(array('$','\'','_'), array('$$',''','­'), $this->title); + printf('<%s%s>
%s', htmlspecialchars($this->title),htmlspecialchars($titlePageStr),"\n"); } /** @@ -64,7 +67,7 @@ // 푸터 정보를 출력 function printFooter() { - print("\n"); + print("\n"); } } ?> diff --git a/addons/mobile/classes/mobile.class.php b/addons/mobile/classes/mobile.class.php index bc5974fdb..d74044105 100644 --- a/addons/mobile/classes/mobile.class.php +++ b/addons/mobile/classes/mobile.class.php @@ -220,7 +220,9 @@ * @brief title 지정 **/ function setTitle($title) { + $oModuleController = &getController('module'); $this->title = $title; + $oModuleController->replaceDefinedLangCode($this->title); } /** @@ -235,11 +237,8 @@ * HTML 컨텐츠에서 텍스트와 링크만 추출하는 기능 **/ function setContent($content) { - // 링크/줄바꿈을 임의의 문자열로 변경하고 태그 모두 제거 - $content = strip_tags(preg_replace('/<(\/?)(a|br)/i','[$1$2', $content)); - - // 링크/줄바꿈을 다시 원위치 - $content = preg_replace('/\[(\/?)(a|br)/i','<$1$2', $content); + // 링크/ 줄바꿈, 강조만 제외하고 모든 태그 제거 + $content = strip_tags($content, '
'); // 탭 여백 제거 $content = str_replace("\t", "", $content); @@ -247,11 +246,15 @@ // 2번 이상 반복되는 공백과 줄나눔을 제거 $content = preg_replace('/( ){2,}/s', '', $content); $content = preg_replace("/([\r\n]+)/s", "\r\n", $content); - $content = str_replace(array("","
","
"), array("","
","
"), $content); + $content = preg_replace(array("/
","
"), array("
","
"), $content); + while(strpos($content, '

')) { $content = str_replace('

','
',$content); } + $content = str_replace(array('$','\'','_'), array('$$',''','­'), $content); + // 모바일의 경우 한 덱에 필요한 사이즈가 적어서 내용을 모두 페이지로 나눔 $contents = array(); while($content) { @@ -368,7 +371,7 @@ // 변환 후 출력 if(strtolower($this->charset) == 'utf-8') print $content; - else print iconv('UTF-8',$this->charset, $content); + else print iconv('UTF-8',$this->charset."//TRANSLIT", $content); exit(); } diff --git a/addons/mobile/classes/wml.class.php b/addons/mobile/classes/wml.class.php index c01365e41..69f0df62c 100644 --- a/addons/mobile/classes/wml.class.php +++ b/addons/mobile/classes/wml.class.php @@ -18,8 +18,10 @@ function printHeader() { header("Content-Type: text/vnd.wap.wml"); header("charset: ".$this->charset); + if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); print("charset."\"?>\n"); - print("\n\n

\n"); + // 카드제목 + printf("\n\n

\n",htmlspecialchars($this->title),htmlspecialchars($titlePageStr)); } /** @@ -27,7 +29,8 @@ **/ function printTitle() { if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); - printf('<%s%s>
%s', $this->title,$titlePageStr,"\n"); + $this->title = str_replace(array('$','\'','_'), array('$$',''','­'), $this->title); + printf('<%s%s>
%s', htmlspecialchars($this->title),htmlspecialchars($titlePageStr),"\n"); } /** diff --git a/modules/board/board.wap.php b/modules/board/board.wap.php index 1f96197ed..62ab6aed0 100644 --- a/modules/board/board.wap.php +++ b/modules/board/board.wap.php @@ -41,7 +41,7 @@ $oComment->setAttribute($val); if(!$oComment->isAccessible()) continue; $content .= "".$oComment->getNickName()." (".$oComment->getRegdate("Y-m-d").")
\r\n".$oComment->getContent(false,false)."
\r\n"; - } + } } // 내용 설정 diff --git a/widgets/login_info/skins/xe_official/login_form.html b/widgets/login_info/skins/xe_official/login_form.html index 67d185b1a..4af360d6c 100644 --- a/widgets/login_info/skins/xe_official/login_form.html +++ b/widgets/login_info/skins/xe_official/login_form.html @@ -33,12 +33,12 @@

- +
- +