diff options
author | Andy Staudacher <andy.st@gmail.com> | 2009-08-29 22:54:20 -0700 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2009-08-29 22:54:20 -0700 |
commit | b9bd1681a3b1496c0f1bbe5e6254ab4fd0c9fe30 (patch) | |
tree | 0ce300329bb2b6ace0e0fd72c94fe5fbb7e4db96 /modules/comment/views | |
parent | 952c8856098dcfd9673d344fc71be85b303c8fb1 (diff) |
Update all code to use helper method html::clean(), html::purify(), ... instead of SafeString directly.
Diffstat (limited to 'modules/comment/views')
-rw-r--r-- | modules/comment/views/admin_block_recent_comments.html.php | 6 | ||||
-rw-r--r-- | modules/comment/views/admin_comments.html.php | 10 | ||||
-rw-r--r-- | modules/comment/views/comment.html.php | 6 | ||||
-rw-r--r-- | modules/comment/views/comment.mrss.php | 12 | ||||
-rw-r--r-- | modules/comment/views/comments.html.php | 6 |
5 files changed, 20 insertions, 20 deletions
diff --git a/modules/comment/views/admin_block_recent_comments.html.php b/modules/comment/views/admin_block_recent_comments.html.php index 2c7a5cf1..dc3975e0 100644 --- a/modules/comment/views/admin_block_recent_comments.html.php +++ b/modules/comment/views/admin_block_recent_comments.html.php @@ -4,13 +4,13 @@ <li class="<?= ($i % 2 == 0) ? "gEvenRow" : "gOddRow" ?>"> <img src="<?= $comment->author()->avatar_url(32, $theme->url("images/avatar.jpg", true)) ?>" class="gAvatar" - alt="<?= SafeString::of($comment->author_name()) ?>" + alt="<?= html::clean($comment->author_name()) ?>" width="32" height="32" /> <?= gallery::date_time($comment->created) ?> <?= t('<a href="#">%author_name</a> said <em>%comment_text</em>', - array("author_name" => SafeString::of($comment->author_name()), - "comment_text" => text::limit_words(nl2br(SafeString::purify($comment->text)), 50))); ?> + array("author_name" => html::clean($comment->author_name()), + "comment_text" => text::limit_words(nl2br(html::purify($comment->text)), 50))); ?> </li> <? endforeach ?> </ul> diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 8b0b4c29..801ce2b3 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -108,12 +108,12 @@ <a href="#"> <img src="<?= $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>" class="gAvatar" - alt="<?= SafeString::of($comment->author_name()) ?>" + alt="<?= html::clean($comment->author_name()) ?>" width="40" height="40" /> </a> - <p><a href="mailto:<?= SafeString::of($comment->author_email()) ?>" - title="<?= SafeString::of($comment->author_email()) ?>"> <?= SafeString::of($comment->author_name()) ?> </a></p> + <p><a href="mailto:<?= html::clean($comment->author_email()) ?>" + title="<?= html::clean($comment->author_email()) ?>"> <?= html::clean($comment->author_name()) ?> </a></p> </td> <td> <div class="right"> @@ -122,7 +122,7 @@ <a href="<?= $item->url() ?>"> <? if ($item->has_thumb()): ?> <img src="<?= $item->thumb_url() ?>" - alt="<?= SafeString::purify($item->title) ?>" + alt="<?= html::purify($item->title) ?>" <?= photo::img_dimensions($item->thumb_width, $item->thumb_height, 75) ?> /> <? else: ?> @@ -132,7 +132,7 @@ </div> </div> <p><?= gallery::date($comment->created) ?></p> - <?= nl2br(SafeString::purify($comment->text)) ?> + <?= nl2br(html::purify($comment->text)) ?> </td> <td> <ul class="gButtonSetVertical"> diff --git a/modules/comment/views/comment.html.php b/modules/comment/views/comment.html.php index 31bb7f4d..1d0786cb 100644 --- a/modules/comment/views/comment.html.php +++ b/modules/comment/views/comment.html.php @@ -4,15 +4,15 @@ <a href="#"> <img src="<?= $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>" class="gAvatar" - alt="<?= SafeString::of($comment->author_name()) ?>" + alt="<?= html::clean($comment->author_name()) ?>" width="40" height="40" /> </a> <?= t("on %date_time, %author_name said", array("date_time" => gallery::date_time($comment->created), - "author_name" => SafeString::of($comment->author_name()))) ?> + "author_name" => html::clean($comment->author_name()))) ?> </p> <div> - <?= nl2br(SafeString::purify($comment->text)) ?> + <?= nl2br(html::purify($comment->text)) ?> </div> </li> diff --git a/modules/comment/views/comment.mrss.php b/modules/comment/views/comment.mrss.php index ae7762d9..c2a4b538 100644 --- a/modules/comment/views/comment.mrss.php +++ b/modules/comment/views/comment.mrss.php @@ -6,9 +6,9 @@ xmlns:fh="http://purl.org/syndication/history/1.0"> <channel> <generator>Gallery 3</generator> - <title><?= SafeString::of($feed->title) ?></title> + <title><?= html::clean($feed->title) ?></title> <link><?= $feed->uri ?></link> - <description><?= SafeString::of($feed->description) ?></description> + <description><?= html::clean($feed->description) ?></description> <language>en-us</language> <atom:link rel="self" href="<?= $feed->uri ?>" type="application/rss+xml" /> <fh:complete/> @@ -22,14 +22,14 @@ <lastBuildDate><?= $pub_date ?></lastBuildDate> <? foreach ($feed->children as $child): ?> <item> - <title><?= SafeString::purify($child->title) ?></title> - <link><?= SafeString::of($child->item_uri) ?></link> - <author><?= SafeString::of($child->author) ?></author> + <title><?= html::purify($child->title) ?></title> + <link><?= html::clean($child->item_uri) ?></link> + <author><?= html::clean($child->author) ?></author> <guid isPermaLink="true"><?= $child->item_uri ?></guid> <pubDate><?= $child->pub_date ?></pubDate> <content:encoded> <![CDATA[ - <p><?= nl2br(SafeString::purify($child->text)) ?></p> + <p><?= nl2br(html::purify($child->text)) ?></p> <p> <img alt="" src="<?= $child->thumb_url ?>" height="<?= $child->thumb_height ?>" width="<?= $child->thumb_width ?>" /> diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php index 9eac0502..1e45c946 100644 --- a/modules/comment/views/comments.html.php +++ b/modules/comment/views/comments.html.php @@ -18,16 +18,16 @@ <a href="#"> <img src="<?= $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>" class="gAvatar" - alt="<?= SafeString::of($comment->author_name()) ?>" + alt="<?= html::clean($comment->author_name()) ?>" width="40" height="40" /> </a> <?= t('on %date <a href="#">%name</a> said', array("date" => date("Y-M-d H:i:s", $comment->created), - "name" => SafeString::of($comment->author_name()))); ?> + "name" => html::clean($comment->author_name()))); ?> </p> <div> - <?= nl2br(SafeString::purify($comment->text)) ?> + <?= nl2br(html::purify($comment->text)) ?> </div> </li> <? endforeach ?> |