Encode HTML chars in RSS feed
This commit is contained in:
parent
6a4401f888
commit
afc80af354
1 changed files with 4 additions and 4 deletions
|
|
@ -23,11 +23,11 @@ $db->sort();
|
||||||
for ($i = 0; $i < $db->count(); $i++) {
|
for ($i = 0; $i < $db->count(); $i++) {
|
||||||
$patch = $db->get($i);
|
$patch = $db->get($i);
|
||||||
echo '<item>';
|
echo '<item>';
|
||||||
echo '<title>' . $patch->getVendor() . ' released ' . $patch->getProduct();
|
echo '<title>' . htmlspecialchars($patch->getVendor()) . ' released ' . htmlspecialchars($patch->getProduct());
|
||||||
if (!empty($patch->getBranch()))
|
if (!empty($patch->getBranch()))
|
||||||
echo ' ' . $patch->getBranch();
|
echo ' ' . htmlspecialchars($patch->getBranch());
|
||||||
echo ' version ' . $patch->getVersion() . '.</title>';
|
echo ' version ' . htmlspecialchars($patch->getVersion()) . '.</title>';
|
||||||
echo '<link>' . $patch->getURL() . '</link>';
|
echo '<link>' . htmlspecialchars($patch->getURL()) . '</link>';
|
||||||
echo '<pubDate>' . date(DATE_RSS, $patch->getTimestamp()) . '</pubDate>';
|
echo '<pubDate>' . date(DATE_RSS, $patch->getTimestamp()) . '</pubDate>';
|
||||||
echo '<guid isPermaLink="false">' . hash('sha256', $patch) . '</guid>';
|
echo '<guid isPermaLink="false">' . hash('sha256', $patch) . '</guid>';
|
||||||
echo '</item>' . "\r\n";
|
echo '</item>' . "\r\n";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue