summaryrefslogtreecommitdiff
path: root/modules/rss
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-08-31 21:51:57 -0700
committerAndy Staudacher <andy.st@gmail.com>2009-08-31 21:51:57 -0700
commit2bc73e2e36fefc3c1ee1b8e97e686c6729e58dcb (patch)
treec511db2684ea957572a1d27caf49a08963ef8484 /modules/rss
parent8c3a2db3803ccaa3572f0bf061ca7faf62f13fca (diff)
Fix XSS vectors in HTML attributes (mostly t() calls)
Diffstat (limited to 'modules/rss')
-rw-r--r--modules/rss/views/feed.mrss.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/rss/views/feed.mrss.php b/modules/rss/views/feed.mrss.php
index 731703c7..3612cbc0 100644
--- a/modules/rss/views/feed.mrss.php
+++ b/modules/rss/views/feed.mrss.php
@@ -22,25 +22,25 @@
<lastBuildDate><?= $pub_date ?></lastBuildDate>
<? foreach ($feed->children as $child): ?>
<item>
- <title><?= html::clean($child->title) ?></title>
+ <title><?= html::purify($child->title) ?></title>
<link><?= url::abs_site("{$child->type}s/{$child->id}") ?></link>
<guid isPermaLink="true"><?= url::abs_site("{$child->type}s/{$child->id}") ?></guid>
<pubDate><?= date("D, d M Y H:i:s T", $child->created); ?></pubDate>
<content:encoded>
<![CDATA[
- <span><?= html::clean($child->description) ?></span>
+ <span><?= html::purify($child->description) ?></span>
<p>
<? if ($child->type == "photo" || $child->type == "album"): ?>
<img alt="" src="<?= $child->resize_url(true) ?>"
- title="<?= html::clean($child->title) ?>"
+ title="<?= html::purify($child->title)->for_html_attr() ?>"
height="<?= $child->resize_height ?>" width="<?= $child->resize_width ?>" /><br />
<? else: ?>
<a href="<?= url::abs_site("{$child->type}s/{$child->id}") ?>">
<img alt="" src="<?= $child->thumb_url(true) ?>"
- title="<?= html::clean($child->title) ?>"
+ title="<?= html::purify($child->title)->for_html_attr() ?>"
height="<?= $child->thumb_height ?>" width="<?= $child->thumb_width ?>" /></a><br />
<? endif ?>
- <?= html::clean($child->description) ?>
+ <?= html::purify($child->description) ?>
</p>
]]>
</content:encoded>