From 3b5a54c01268ae0fb002e7c246b7ae0ae141d88a Mon Sep 17 00:00:00 2001 From: misol Date: Mon, 19 Jan 2009 14:22:26 +0000 Subject: [PATCH] =?UTF-8?q?RSS=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= 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@5411 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- common/tpl/common_layout.html | 2 +- modules/document/document.item.php | 12 ++++++++++++ modules/rss/tpl/atom10.html | 2 +- modules/rss/tpl/rss20.html | 2 +- modules/rss/tpl/xe_rss.html | 4 ++-- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/common/tpl/common_layout.html b/common/tpl/common_layout.html index b6336a034..b20acd002 100644 --- a/common/tpl/common_layout.html +++ b/common/tpl/common_layout.html @@ -43,7 +43,7 @@ - + diff --git a/modules/document/document.item.php b/modules/document/document.item.php index d8b52d810..13a56d4db 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -282,6 +282,18 @@ return $content; } + /** + * 에디터 코드가 변환된 내용 반환 + **/ + function getTransContent($add_popup_menu = true, $add_content_info = true, $resource_realpath = false, $add_xe_content_class = true) { + $oContext = &Context::getInstance(); + + $content = $this->getContent($add_popup_menu, $add_content_info, $resource_realpath, $add_xe_content_class); + $content = $oContext->transContent($content); + + return $content; + } + function getSummary($str_size = 50) { // 영문이나 숫자가 연결되어서 20개 이상으로 연결시에 강제 띄움 시도 - {20,}으로 길이를 정하면, 20개 이상 문자열 맨 마지막에 스페이스를 추가할 뿐 원하는 의도는 달성되지 못함 $content = preg_replace('/([a-z0-9\+:\/\.\~,\|\!\@\#\$\%\^\&\*\(\)\_]){20}/is',"$0-",$this->getContent(false,false)); diff --git a/modules/rss/tpl/atom10.html b/modules/rss/tpl/atom10.html index 99f4d149e..9d7146b22 100644 --- a/modules/rss/tpl/atom10.html +++ b/modules/rss/tpl/atom10.html @@ -23,7 +23,7 @@ - {str_replace('\'', ''', htmlspecialchars(Context::getInstance()->transContent($oDocument->getContent(false,false,true))))} + {str_replace('\'', ''', htmlspecialchars($oDocument->getTransContent(false,false,true)))} {str_replace('\'', ''', htmlspecialchars($oDocument->getContentText(100)))} diff --git a/modules/rss/tpl/rss20.html b/modules/rss/tpl/rss20.html index 85926d9f5..7db88f52b 100644 --- a/modules/rss/tpl/rss20.html +++ b/modules/rss/tpl/rss20.html @@ -18,7 +18,7 @@ {$oDocument->getPermanentUrl()}#comment - {str_replace('\'', ''', htmlspecialchars(Context::getInstance()->transContent($oDocument->getContent(false,false,true))))} + {str_replace('\'', ''', htmlspecialchars($oDocument->getTransContent(false,false,true)))} {str_replace('\'', ''', htmlspecialchars($oDocument->getContentText(100)))} diff --git a/modules/rss/tpl/xe_rss.html b/modules/rss/tpl/xe_rss.html index 6de4abeae..f613fa8e5 100644 --- a/modules/rss/tpl/xe_rss.html +++ b/modules/rss/tpl/xe_rss.html @@ -14,8 +14,8 @@ {str_replace('\'', ''',$oDocument->getTitle())} {str_replace('\'', ''',$oDocument->getNickName())} {$oDocument->getPermanentUrl()} - - {str_replace('\'', ''', htmlspecialchars($oDocument->getContent(false)))} + + {str_replace('\'', ''', htmlspecialchars($oDocument->getTransContent(false,false,true)))} {str_replace('\'', ''', htmlspecialchars($oDocument->getContentText(100)))}