mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix #872 remove CDATA from RSS/Atom feeds
This commit is contained in:
parent
4904ca5155
commit
f7915f8204
5 changed files with 27 additions and 27 deletions
|
|
@ -157,7 +157,7 @@ class rssView extends rss
|
|||
$info->date = date('Y-m-d\TH:i:sP');
|
||||
break;
|
||||
default:
|
||||
$info->date = date("D, d M Y H:i:s").' '.$GLOBALS['_time_zone'];
|
||||
$info->date = date("r");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title type="text">{$info->title}</title>
|
||||
<!--@if($info->description)-->
|
||||
<subtitle type="html">{str_replace('\'', ''', htmlspecialchars($info->description, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</subtitle>
|
||||
<subtitle type="html">{escape($info->description, false)}</subtitle>
|
||||
<!--@end-->
|
||||
<updated>{$info->date}</updated>
|
||||
<id>{$info->id}</id>
|
||||
|
|
@ -11,25 +11,25 @@
|
|||
<link rel="self" type="application/atom+xml" href="{$info->id}"/>
|
||||
<generator uri="https://www.xpressengine.com/">XpressEngine</generator>
|
||||
<!--@foreach($document_list as $oDocument)--> <entry>
|
||||
<title><![CDATA[{$oDocument->getTitleText()}]]></title>
|
||||
<title>{$oDocument->getTitleText()}</title>
|
||||
<id>{$oDocument->getPermanentUrl()}</id>
|
||||
<published>{$oDocument->getRegdate('Y-m-d\TH:i:sP')}</published>
|
||||
<updated>{zdate($oDocument->get('last_update'),'Y-m-d\TH:i:sP')}</updated>
|
||||
<link rel="alternate" type="text/html" href="{$oDocument->getPermanentUrl()}"/>
|
||||
<link rel="replies" type="text/html" href="{$oDocument->getPermanentUrl()}#comment"/>
|
||||
<author>
|
||||
<name><![CDATA[{str_replace('\'', ''',$oDocument->getNickName())}]]></name>
|
||||
<name>{str_replace('\'', ''',$oDocument->getNickName())}</name>
|
||||
<!--@if($oDocument->isExistsHomepage())-->
|
||||
<uri>{$oDocument->getHomepageUrl()}</uri>
|
||||
<!--@end-->
|
||||
</author>
|
||||
<!--@if($open_rss_config[$oDocument->get('module_srl')]=='Y')-->
|
||||
<content type="html"><![CDATA[{$oDocument->getTransContent(false,false,true)}]]></content>
|
||||
<content type="html">{$oDocument->getTransContent(false,false,true)}</content>
|
||||
<!--@else-->
|
||||
<summary type="text"><![CDATA[{$oDocument->getContentText(100)}]]></summary>
|
||||
<summary type="text">{$oDocument->getContentText(100)}</summary>
|
||||
<!--@end-->
|
||||
<!--@foreach($oDocument->get('tag_list') as $tag)-->
|
||||
<category term="{str_replace('\'', ''', htmlspecialchars($tag, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}"/>
|
||||
<category term="{escape($tag, false)}"/>
|
||||
<!--@end-->
|
||||
|
||||
</entry>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">
|
||||
<channel rdf:about="{getUrl('','mid',$mid,'module','rss','act','rss','format','rss1.0','page',Context::get('page'),'start_date',Context::get('start_date'),'end_date',Context::get('end_date'))}">
|
||||
<title><![CDATA[{$info->title}]]></title>
|
||||
<title>{$info->title}</title>
|
||||
<link>{$info->link}</link>
|
||||
<description><![CDATA[{$info->description}]]></description>
|
||||
<description>{$info->description}</description>
|
||||
<items>
|
||||
<rdf:Seq>
|
||||
<!--@foreach($document_list as $oDocument)-->
|
||||
|
|
@ -17,9 +17,9 @@
|
|||
</channel>
|
||||
<!--@foreach($document_list as $oDocument)-->
|
||||
<item rdf:about="{$oDocument->getPermanentUrl()}">
|
||||
<title><![CDATA[{$oDocument->getTitleText()}]]></title>
|
||||
<title>{$oDocument->getTitleText()}</title>
|
||||
<link>{$oDocument->getPermanentUrl()}</link>
|
||||
<description><![CDATA[{$oDocument->getContentText(200)}]]></description>
|
||||
<description>{$oDocument->getContentText(200)}</description>
|
||||
<dc:date>{$oDocument->getRegdate('Y-m-d\TH:i:sP')}</dc:date>
|
||||
</item>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -2,40 +2,40 @@
|
|||
|
||||
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
|
||||
<channel>
|
||||
<title><![CDATA[{$info->title}]]></title>
|
||||
<title>{$info->title}</title>
|
||||
<link>{$info->link}</link>
|
||||
<description><![CDATA[{$info->description}]]></description>
|
||||
<description>{$info->description}</description>
|
||||
<language>{$info->language}</language>
|
||||
<pubDate>{$info->date}</pubDate>
|
||||
<lastBuildDate>{$info->date}</lastBuildDate>
|
||||
<generator>XpressEngine</generator>
|
||||
<generator>Rhymix</generator>
|
||||
<!--@if($info->feed_copyright)-->
|
||||
<copyright><![CDATA[{$info->feed_copyright}]]></copyright>
|
||||
<copyright>{$info->feed_copyright}</copyright>
|
||||
<!--@end-->
|
||||
<!--@if($info->image)-->
|
||||
<image>
|
||||
<url>{$info->image}</url>
|
||||
<title><![CDATA[{$info->title}]]></title>
|
||||
<title>{$info->title}</title>
|
||||
<link>{$info->link}</link>
|
||||
</image>
|
||||
<!--@end-->
|
||||
<!--@foreach($document_list as $oDocument)-->
|
||||
<item>
|
||||
<title><![CDATA[{str_replace('\'', ''',htmlspecialchars($oDocument->getTitleText(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}]]></title>
|
||||
<dc:creator><![CDATA[{str_replace('\'', ''',$oDocument->getNickName())}]]></dc:creator>
|
||||
<title>{$oDocument->getTitleText()}</title>
|
||||
<dc:creator>{escape($oDocument->getNickName(), false)}</dc:creator>
|
||||
<link>{$oDocument->getPermanentUrl()}</link>
|
||||
<guid isPermaLink="true">{$oDocument->getPermanentUrl()}</guid>
|
||||
<!--@if($oDocument->allowComment()) -->
|
||||
<comments>{$oDocument->getPermanentUrl()}#comment</comments>
|
||||
<!--@end-->
|
||||
<!--@if($open_rss_config[$oDocument->get('module_srl')]=='Y')-->
|
||||
<description><![CDATA[{$oDocument->getTransContent(false,false,true)}]]></description>
|
||||
<description>{$oDocument->getTransContent(false,false,true)}</description>
|
||||
<!--@else-->
|
||||
<description><![CDATA[{$oDocument->getContentText(100)}]]></description>
|
||||
<description>{$oDocument->getContentText(100)}</description>
|
||||
<!--@end-->
|
||||
<pubDate>{$oDocument->getRegdateGM()}</pubDate>
|
||||
<!--@foreach($oDocument->get('tag_list') as $tag)-->
|
||||
<category><![CDATA[{str_replace('\'', ''', htmlspecialchars($tag, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}]]></category>
|
||||
<category>{escape($tag, false)}</category>
|
||||
<!--@end-->
|
||||
<!--@if($oDocument->getCommentcount()>0)-->
|
||||
<slash:comments>{$oDocument->getCommentcount()}</slash:comments>
|
||||
|
|
|
|||
|
|
@ -4,22 +4,22 @@
|
|||
<channel>
|
||||
<title>{$info->title}</title>
|
||||
<link>{$info->link}</link>
|
||||
<description>{str_replace('\'', ''', htmlspecialchars($info->description, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</description>
|
||||
<description>{escape($info->description, false)}</description>
|
||||
<language>{$info->language}</language>
|
||||
<pubDate>{$info->date}</pubDate>
|
||||
<totalCount>{$info->total_count}</totalCount>
|
||||
<totalPage>{$info->total_page}</totalPage>
|
||||
<!--@foreach($document_list as $oDocument)-->
|
||||
<item>
|
||||
<title>{str_replace('\'', ''',htmlspecialchars($oDocument->getTitleText(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</title>
|
||||
<author>{str_replace('\'', ''',$oDocument->getNickName())}</author>
|
||||
<title>{$oDocument->getTitleText()}</title>
|
||||
<author>{escape($oDocument->getNickName(), false)}</author>
|
||||
<link>{$oDocument->getPermanentUrl()}</link>
|
||||
<!--@if($open_rss_config[$oDocument->get('module_srl')]->open_rss=='Y')-->
|
||||
<description>{str_replace('\'', ''', htmlspecialchars($oDocument->getTransContent(false,false,true), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</description>
|
||||
<description>{escape($oDocument->getTransContent(false, false, true), false)}</description>
|
||||
<!--@else-->
|
||||
<description>{str_replace('\'', ''', htmlspecialchars($oDocument->getContentText(100), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</description>
|
||||
<description>{escape($oDocument->getContentText(100), false)}</description>
|
||||
<!--@end-->
|
||||
<tags>{str_replace('\'', ''', htmlspecialchars($oDocument->get('tags'), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</tags>
|
||||
<tags>{escape($oDocument->get('tags'), false)}</tags>
|
||||
<comment_count>{$oDocument->getCommentCount()}</comment_count>
|
||||
<trackback_count>{$oDocument->getTrackbackCount()}</trackback_count>
|
||||
<pubDate>{$oDocument->getRegdateGM()}</pubDate>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue