#66 install php version check

#16 install rewrite module usable check
#48 htmlspecialchars function params add
This commit is contained in:
akasima 2013-11-18 16:54:17 +09:00 committed by bnu
parent 51b6b21cf2
commit 736f382b27
93 changed files with 240 additions and 215 deletions

View file

@ -104,17 +104,17 @@ class rssView extends rss
$info->title = str_replace('\'', ''',$info->title);
if($config->feed_description)
{
$info->description = str_replace('\'', ''', htmlspecialchars($config->feed_description));
$info->description = str_replace('\'', ''', htmlspecialchars($config->feed_description, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
}
else
{
$info->description = str_replace('\'', ''', htmlspecialchars($this->module_info->description));
$info->description = str_replace('\'', ''', htmlspecialchars($this->module_info->description, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
}
$info->link = getUrl('','mid',$mid);
$info->feed_copyright = str_replace('\'', ''', htmlspecialchars($feed_config->feed_copyright));
$info->feed_copyright = str_replace('\'', ''', htmlspecialchars($feed_config->feed_copyright, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
if(!$info->feed_copyright)
{
$info->feed_copyright = str_replace('\'', ''', htmlspecialchars($total_config->feed_copyright));
$info->feed_copyright = str_replace('\'', ''', htmlspecialchars($total_config->feed_copyright, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
}
}
}
@ -131,14 +131,14 @@ class rssView extends rss
}
$oModuleController->replaceDefinedLangCode($info->title);
$info->title = str_replace('\'', ''', htmlspecialchars($info->title));
$info->description = str_replace('\'', ''', htmlspecialchars($total_config->feed_description));
$info->title = str_replace('\'', ''', htmlspecialchars($info->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
$info->description = str_replace('\'', ''', htmlspecialchars($total_config->feed_description, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
$info->link = Context::getRequestUri();
$info->feed_copyright = str_replace('\'', ''', htmlspecialchars($total_config->feed_copyright));
$info->feed_copyright = str_replace('\'', ''', htmlspecialchars($total_config->feed_copyright, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
}
if($add_description) $info->description .= "\r\n".$add_description;
if($total_config->image) $info->image = Context::getRequestUri().str_replace('\'', ''', htmlspecialchars($total_config->image));
if($total_config->image) $info->image = Context::getRequestUri().str_replace('\'', ''', htmlspecialchars($total_config->image, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
switch(Context::get('format'))
{
case 'atom':

View file

@ -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('\'', '&apos;', htmlspecialchars($info->description))}</subtitle>
<subtitle type="html">{str_replace('\'', '&apos;', htmlspecialchars($info->description, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</subtitle>
<!--@end-->
<updated>{$info->date}</updated>
<id>{$info->id}</id>
@ -11,7 +11,7 @@
<link rel="self" type="application/atom+xml" href="{$info->id}"/>
<generator uri="http://www.xpressengine.com/">XpressEngine</generator>
<!--@foreach($document_list as $oDocument)--> <entry>
<title>{str_replace('\'', '&apos;',htmlspecialchars($oDocument->getTitleText()))}</title>
<title>{str_replace('\'', '&apos;',htmlspecialchars($oDocument->getTitleText(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</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>
@ -24,12 +24,12 @@
<!--@end-->
</author>
<!--@if($open_rss_config[$oDocument->get('module_srl')]=='Y')-->
<content type="html">{str_replace('\'', '&apos;', htmlspecialchars($oDocument->getTransContent(false,false,true)))}</content>
<content type="html">{str_replace('\'', '&apos;', htmlspecialchars($oDocument->getTransContent(false,false,true), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</content>
<!--@else-->
<summary type="text">{str_replace('\'', '&apos;', htmlspecialchars($oDocument->getContentText(100)))}</summary>
<summary type="text">{str_replace('\'', '&apos;', htmlspecialchars($oDocument->getContentText(100), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</summary>
<!--@end-->
<!--@foreach($oDocument->get('tag_list') as $tag)-->
<category term="{str_replace('\'', '&apos;', htmlspecialchars($tag))}"/>
<category term="{str_replace('\'', '&apos;', htmlspecialchars($tag, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}"/>
<!--@end-->
</entry>

View file

@ -4,7 +4,7 @@
<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>{$info->title}</title>
<link>{$info->link}</link>
<description>{str_replace('\'', '&apos;', htmlspecialchars($info->description))}</description>
<description>{str_replace('\'', '&apos;', htmlspecialchars($info->description, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</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>{str_replace('\'', '&apos;',htmlspecialchars($oDocument->getTitleText()))}</title>
<title>{str_replace('\'', '&apos;',htmlspecialchars($oDocument->getTitleText(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</title>
<link>{$oDocument->getPermanentUrl()}</link>
<description>{str_replace('\'', '&apos;', htmlspecialchars($oDocument->getContentText(200)))}</description>
<description>{str_replace('\'', '&apos;', htmlspecialchars($oDocument->getContentText(200), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</description>
<dc:date>{$oDocument->getRegdate('Y-m-d\TH:i:sP')}</dc:date>
</item>
<!--@end-->

View file

@ -21,7 +21,7 @@
<!--@end-->
<!--@foreach($document_list as $oDocument)-->
<item>
<title>{str_replace('\'', '&apos;',htmlspecialchars($oDocument->getTitleText()))}</title>
<title>{str_replace('\'', '&apos;',htmlspecialchars($oDocument->getTitleText(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</title>
<dc:creator>{str_replace('\'', '&apos;',$oDocument->getNickName())}</dc:creator>
<link>{$oDocument->getPermanentUrl()}</link>
<guid isPermaLink="true">{$oDocument->getPermanentUrl()}</guid>
@ -29,13 +29,13 @@
<comments>{$oDocument->getPermanentUrl()}#comment</comments>
<!--@end-->
<!--@if($open_rss_config[$oDocument->get('module_srl')]=='Y')-->
<description>{str_replace('\'', '&apos;', htmlspecialchars($oDocument->getTransContent(false,false,true)))}</description>
<description>{str_replace('\'', '&apos;', htmlspecialchars($oDocument->getTransContent(false,false,true), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</description>
<!--@else-->
<description>{str_replace('\'', '&apos;', htmlspecialchars($oDocument->getContentText(100)))}</description>
<description>{str_replace('\'', '&apos;', htmlspecialchars($oDocument->getContentText(100), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</description>
<!--@end-->
<pubDate>{$oDocument->getRegdateGM()}</pubDate>
<!--@foreach($oDocument->get('tag_list') as $tag)-->
<category>{str_replace('\'', '&apos;', htmlspecialchars($tag))}</category>
<category>{str_replace('\'', '&apos;', htmlspecialchars($tag, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</category>
<!--@end-->
<!--@if($oDocument->getCommentcount()>0)-->
<slash:comments>{$oDocument->getCommentcount()}</slash:comments>

View file

@ -28,7 +28,7 @@
<div class="x_control-group">
<label class="x_control-label" for="feed_title">{$lang->title}</label>
<div class="x_controls">
<input type="text" name="feed_title" value="{htmlspecialchars($total_config->feed_title)}" id="feed_title" />
<input type="text" name="feed_title" value="{htmlspecialchars($total_config->feed_title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" id="feed_title" />
</div>
</div>
<div class="x_control-group">
@ -57,7 +57,7 @@
<div class="x_control-group">
<label class="x_control-label" for="feed_copyright">{$lang->feed_copyright}</label>
<div class="x_controls">
<input type="text" name="feed_copyright" value="{htmlspecialchars($total_config->feed_copyright)}" id="feed_copyright" />
<input type="text" name="feed_copyright" value="{htmlspecialchars($total_config->feed_copyright, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" id="feed_copyright" />
</div>
</div>
<div class="x_control-group">

View file

@ -28,14 +28,14 @@
<div class="x_control-group">
<label for="feed_description" class="x_control-label">{$lang->description}</label>
<div class="x_controls">
<textarea name="feed_description" id="feed_description" rows="4" cols="42" style="float:left;margin-right:8px">{htmlspecialchars($rss_config->feed_description)}</textarea>
<textarea name="feed_description" id="feed_description" rows="4" cols="42" style="float:left;margin-right:8px">{htmlspecialchars($rss_config->feed_description, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}</textarea>
<p class="x_help-block">{$lang->about_feed_description}</p>
</div>
</div>
<div class="x_control-group">
<label for="feed_copyright" class="x_control-label">{$lang->feed_copyright}</label>
<div class="x_controls">
<textarea name="feed_copyright" id="feed_copyright" rows="4" cols="42" style="float:left;margin-right:8px">{htmlspecialchars($rss_config->feed_copyright)}</textarea>
<textarea name="feed_copyright" id="feed_copyright" rows="4" cols="42" style="float:left;margin-right:8px">{htmlspecialchars($rss_config->feed_copyright, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}</textarea>
<p class="x_help-block">{$lang->about_feed_copyright}</p>
</div>
</div>

View file

@ -4,22 +4,22 @@
<channel>
<title>{$info->title}</title>
<link>{$info->link}</link>
<description>{str_replace('\'', '&apos;', htmlspecialchars($info->description))}</description>
<description>{str_replace('\'', '&apos;', htmlspecialchars($info->description, ENT_COMPAT | ENT_HTML401, 'UTF-8', 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('\'', '&apos;',htmlspecialchars($oDocument->getTitleText()))}</title>
<title>{str_replace('\'', '&apos;',htmlspecialchars($oDocument->getTitleText(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</title>
<author>{str_replace('\'', '&apos;',$oDocument->getNickName())}</author>
<link>{$oDocument->getPermanentUrl()}</link>
<!--@if($open_rss_config[$oDocument->get('module_srl')]->open_rss=='Y')-->
<description>{str_replace('\'', '&apos;', htmlspecialchars($oDocument->getTransContent(false,false,true)))}</description>
<description>{str_replace('\'', '&apos;', htmlspecialchars($oDocument->getTransContent(false,false,true), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</description>
<!--@else-->
<description>{str_replace('\'', '&apos;', htmlspecialchars($oDocument->getContentText(100)))}</description>
<description>{str_replace('\'', '&apos;', htmlspecialchars($oDocument->getContentText(100), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</description>
<!--@end-->
<tags>{str_replace('\'', '&apos;', htmlspecialchars($oDocument->get('tags')))}</tags>
<tags>{str_replace('\'', '&apos;', htmlspecialchars($oDocument->get('tags'), ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</tags>
<comment_count>{$oDocument->getCommentCount()}</comment_count>
<trackback_count>{$oDocument->getTrackbackCount()}</trackback_count>
<pubDate>{$oDocument->getRegdateGM()}</pubDate>