summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-08-29 10:40:34 -0700
committerAndy Staudacher <andy.st@gmail.com>2009-08-29 10:40:34 -0700
commita2e2a2178b1b84a9895fdddd020c5ec8dddf89c5 (patch)
treeec943f2da0f978ec27b0b22a817869f3bf693d68
parent2d63348ef6c89386f5aec9f567cb4c270bcbe02a (diff)
Using SafeString in album controller / view
-rw-r--r--modules/gallery/controllers/albums.php6
-rw-r--r--themes/default/views/album.html.php6
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php
index cdfa823d..ec3eb426 100644
--- a/modules/gallery/controllers/albums.php
+++ b/modules/gallery/controllers/albums.php
@@ -112,7 +112,7 @@ class Albums_Controller extends Items_Controller {
log::success("content", "Created an album",
html::anchor("albums/$new_album->id", "view album"));
message::success(
- t("Created album %album_title", array("album_title" => p::clean($new_album->title))));
+ t("Created album %album_title", array("album_title" => $new_album->title)));
print json_encode(
array("result" => "success",
@@ -145,7 +145,7 @@ class Albums_Controller extends Items_Controller {
log::success("content", "Added a photo", html::anchor("photos/$photo->id", "view photo"));
message::success(
- t("Added photo %photo_title", array("photo_title" => p::clean($photo->title))));
+ t("Added photo %photo_title", array("photo_title" => $photo->title)));
print json_encode(
array("result" => "success",
@@ -194,7 +194,7 @@ class Albums_Controller extends Items_Controller {
log::success("content", "Updated album", "<a href=\"albums/$album->id\">view</a>");
message::success(
- t("Saved album %album_title", array("album_title" => p::clean($album->title))));
+ t("Saved album %album_title", array("album_title" => $album->title)));
print json_encode(
array("result" => "success",
diff --git a/themes/default/views/album.html.php b/themes/default/views/album.html.php
index 65ea3381..c2f95731 100644
--- a/themes/default/views/album.html.php
+++ b/themes/default/views/album.html.php
@@ -2,8 +2,8 @@
<? // @todo Set hover on AlbumGrid list items for guest users ?>
<div id="gInfo">
<?= $theme->album_top() ?>
- <h1><?= p::purify($item->title) ?></h1>
- <div class="gDescription"><?= nl2br(p::purify($item->description)) ?></div>
+ <h1><?= SafeString::of($item->title)->purified_html() ?></h1>
+ <div class="gDescription"><?= nl2br(SafeString::of($item->description)->purified_html()) ?></div>
</div>
<ul id="gAlbumGrid">
@@ -20,7 +20,7 @@
</a>
<?= $theme->thumb_bottom($child) ?>
<?= $theme->thumb_menu($child) ?>
- <h2><span></span><a href="<?= $child->url() ?>"><?= p::clean($child->title) ?></a></h2>
+ <h2><span></span><a href="<?= $child->url() ?>"><?= SafeString::of($child->title) ?></a></h2>
<ul class="gMetadata">
<?= $theme->thumb_info($child) ?>
</ul>