|
1 | | -<?php use \Kirby\Toolkit\XML; |
| 1 | +<?php use \Kirby\Toolkit\Xml; |
2 | 2 |
|
3 | 3 | echo '<?xml version="1.0" encoding="utf-8"?>'; |
4 | 4 | ?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"> |
5 | 5 |
|
6 | 6 | <channel> |
7 | | - <title><?= XML::encode($title) ?></title> |
8 | | - <link><?= XML::encode($link) ?></link> |
9 | | - <lastBuildDate><?= \date('r', $modified) ?></lastBuildDate> |
10 | | - <atom:link href="<?= XML::encode($url) ?>" rel="self" type="application/rss+xml" /> |
| 7 | + <title><?php echo Xml::encode($title) ?></title> |
| 8 | + <link><?php echo Xml::encode($link) ?></link> |
| 9 | + <lastBuildDate><?php echo \date('r', $modified) ?></lastBuildDate> |
| 10 | + <atom:link href="<?php echo Xml::encode($url) ?>" rel="self" type="application/rss+xml" /> |
11 | 11 |
|
12 | 12 | <?php if (!empty($description)): ?> |
13 | | - <description><?= XML::encode($description) ?></description> |
| 13 | + <description><?php echo Xml::encode($description) ?></description> |
14 | 14 | <?php endif ?> |
15 | 15 |
|
16 | 16 | <?php foreach ($items as $item): ?> |
17 | 17 | <item> |
18 | | - <title><?= XML::encode($item->title()) ?></title> |
19 | | - <link><?= XML::encode($item->url()) ?></link> |
20 | | - <guid><?= XML::encode($item->id()) ?></guid> |
21 | | - <pubDate><?= $datefield == 'modified' ? $item->modified('r') : $item->date('r', $datefield) ?></pubDate> |
22 | | - <description><![CDATA[<?= $item->{$textfield}()->kirbytext() ?>]]></description> |
| 18 | + <title><?php echo Xml::encode($item->title()) ?></title> |
| 19 | + <link><?php echo Xml::encode($item->url()) ?></link> |
| 20 | + <guid><?php echo Xml::encode($item->id()) ?></guid> |
| 21 | + <pubDate><?php echo $datefield == 'modified' ? $item->modified('r') : $item->date('r', $datefield) ?></pubDate> |
| 22 | + <description><![CDATA[<?php echo $item->{$textfield}()->kirbytext() ?>]]></description> |
23 | 23 | </item> |
24 | 24 | <?php endforeach ?> |
25 | 25 |
|
|
0 commit comments