mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 00:02:21 +09:00
issue 3645, php5 대응, 함수 대체
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@13202 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5fa0bf23d7
commit
5693e340fe
28 changed files with 95 additions and 125 deletions
|
|
@ -465,7 +465,7 @@ class content extends WidgetHandler
|
|||
$buff = $this->requestFeedContents($args->rss_url);
|
||||
|
||||
$encoding = preg_match("/<\?xml.*encoding=\"(.+)\".*\?>/i", $buff, $matches);
|
||||
if($encoding && !preg_match("/UTF-8/i", $matches[1])) $buff = Context::convertEncodingStr($buff);
|
||||
if($encoding && stripos($matches[1], "UTF-8") === FALSE) $buff = Context::convertEncodingStr($buff);
|
||||
|
||||
$buff = preg_replace("/<\?xml.*\?>/i", "", $buff);
|
||||
|
||||
|
|
@ -602,7 +602,7 @@ class content extends WidgetHandler
|
|||
$content_item->setContentsLink($rss->link);
|
||||
if($item->title)
|
||||
{
|
||||
if(!preg_match("/html/i", $value->title->attrs->type)) $item->title = $value->title->body;
|
||||
if(stripos($value->title->attrs->type, "html") === FALSE) $item->title = $value->title->body;
|
||||
}
|
||||
$content_item->setTitle($item->title);
|
||||
$content_item->setNickName(max($item->author,$item->{'dc:creator'}));
|
||||
|
|
@ -611,14 +611,14 @@ class content extends WidgetHandler
|
|||
$item->description = preg_replace('!<a href=!is','<a onclick="window.open(this.href);return false" href=', $item->content);
|
||||
if($item->description)
|
||||
{
|
||||
if(!preg_match("/html/i", $value->content->attrs->type)) $item->description = htmlspecialchars($item->description);
|
||||
if(stripos($value->content->attrs->type, "html") === FALSE) $item->description = htmlspecialchars($item->description);
|
||||
}
|
||||
if(!$item->description)
|
||||
{
|
||||
$item->description = $item->summary;
|
||||
if($item->description)
|
||||
{
|
||||
if(!preg_match("/html/i", $value->summary->attrs->type)) $item->description = htmlspecialchars($item->description);
|
||||
if(stripos($value->summary->attrs->type, "html") === FALSE) $item->description = htmlspecialchars($item->description);
|
||||
}
|
||||
}
|
||||
$content_item->setContent($this->_getSummary($item->description, $args->content_cut_size));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue