Improved image enclosure as per RSS 2, and improved description removing tags
This commit is contained in:
parent
d586fce4f2
commit
2941138358
1 changed files with 4 additions and 2 deletions
|
@ -75,8 +75,10 @@ class pluginRSS extends Plugin {
|
|||
$xml .= '<item>';
|
||||
$xml .= '<title>'.$page->title().'</title>';
|
||||
$xml .= '<link>'.$this->encodeURL($page->permalink()).'</link>';
|
||||
$xml .= '<image>'.$page->coverImage(true).'</image>';
|
||||
$xml .= '<description>'.Sanitize::html($page->contentBreak()).'</description>';
|
||||
$imagepath = parse_url($page->coverImage(true), PHP_URL_PATH);
|
||||
$imagepath = $_SERVER['DOCUMENT_ROOT'] . $imagepath;
|
||||
$xml .= '<enclosure url="'.$page->coverImage(true). '" length="'.filesize($imagepath) .'" type="'.mime_content_type($imagepath) .'" />';
|
||||
$xml .= '<description>'. strip_tags( $page->contentBreak() ) .'</description>';
|
||||
$xml .= '<pubDate>'.date(DATE_RSS,strtotime($page->getValue('dateRaw'))).'</pubDate>';
|
||||
$xml .= '<guid isPermaLink="false">'.$page->uuid().'</guid>';
|
||||
$xml .= '</item>';
|
||||
|
|
Loading…
Reference in a new issue