Fix invalid RSS feed encoding

Fixes #4426
This commit is contained in:
Frédéric Guillot 2020-03-03 20:33:41 -08:00
parent ea11436663
commit 5e7758d39d
2 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?= '<?xml version="1.0" encoding="UTF-8"?>' ?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><?= e("%s's activity", $project['name']) ?></title>
<title><?= t("%s's activity", $project['name']) ?></title>
<updated><?= date(DATE_ATOM) ?></updated>
<link rel="alternate" type="text/html" href="<?= $this->url->base() ?>"/>
<link rel="self" type="application/atom+xml" href="<?= $this->url->href('FeedController', 'project', ['token' => $project['token']], false, '', true) ?>"/>
@ -13,9 +13,9 @@
<updated><?= date(DATE_ATOM, $event['date_creation']) ?></updated>
<published><?= date(DATE_ATOM, $event['date_creation']) ?></published>
<author>
<name><?= $event['author'] ?></name>
<name><?= htmlentities($event['author'], ENT_XML1) ?></name>
</author>
<title><?= $event['event_title'] ?></title>
<title><?= htmlentities($event['event_title'], ENT_XML1) ?></title>
<content type="html"><![CDATA[<?= $event['event_content'] ?>]]></content>
</entry>
<?php endforeach ?>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?= '<?xml version="1.0" encoding="UTF-8"?>' ?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><?= e('Project activities for %s', $this->user->getFullname($user)) ?></title>
<title><?= t('Project activities for %s', $this->user->getFullname($user)) ?></title>
<updated><?= date(DATE_ATOM) ?></updated>
<link rel="alternate" type="text/html" href="<?= $this->url->base() ?>"/>
<link rel="self" type="application/atom+xml" href="<?= $this->url->href('FeedController', 'user', ['token' => $user['token']], false, '', true) ?>"/>
@ -13,9 +13,9 @@
<updated><?= date(DATE_ATOM, $event['date_creation']) ?></updated>
<published><?= date(DATE_ATOM, $event['date_creation']) ?></published>
<author>
<name><?= $event['author'] ?></name>
<name><?= htmlentities($event['author'], ENT_XML1) ?></name>
</author>
<title><?= $event['event_title'] ?></title>
<title><?= htmlentities($event['event_title'], ENT_XML1) ?></title>
<content type="html"><![CDATA[<?= $event['event_content'] ?>]]></content>
</entry>
<?php endforeach ?>