summaryrefslogtreecommitdiff
path: root/modules/gallery
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-08-31 00:42:18 -0700
committerAndy Staudacher <andy.st@gmail.com>2009-08-31 00:42:18 -0700
commitddb84c84e16766c6b79bd7fea61532257e83ef8b (patch)
treeb66c8a2ce6e8d21da31b6d67adfd3ac5de9b8fe6 /modules/gallery
parent6d26b0dd6e900250072ca723c388cf3c5d987aeb (diff)
Rename mark_safe() to mark_clean()
Diffstat (limited to 'modules/gallery')
-rw-r--r--modules/gallery/controllers/admin_languages.php2
-rw-r--r--modules/gallery/helpers/MY_html.php6
-rw-r--r--modules/gallery/helpers/graphics.php2
-rw-r--r--modules/gallery/tests/Html_Helper_Test.php4
-rw-r--r--modules/gallery/tests/Xss_Security_Test.php2
-rw-r--r--modules/gallery/views/admin_block_welcome.html.php10
-rw-r--r--modules/gallery/views/permissions_browse.html.php2
-rw-r--r--modules/gallery/views/upgrader.html.php2
8 files changed, 15 insertions, 15 deletions
diff --git a/modules/gallery/controllers/admin_languages.php b/modules/gallery/controllers/admin_languages.php
index d85c47f9..894daedb 100644
--- a/modules/gallery/controllers/admin_languages.php
+++ b/modules/gallery/controllers/admin_languages.php
@@ -111,7 +111,7 @@ class Admin_Languages_Controller extends Admin_Controller {
$group->input("api_key")
->label(empty($api_key)
? t("This is a unique key that will allow you to send translations to the remote server. To get your API key go to %server-link.",
- array("server-link" => html::mark_safe(html::anchor($server_link))))
+ array("server-link" => html::mark_clean(html::anchor($server_link))))
: t("API Key"))
->value($api_key)
->error_messages("invalid", t("The API key you provided is invalid."));
diff --git a/modules/gallery/helpers/MY_html.php b/modules/gallery/helpers/MY_html.php
index 4522d01c..b29f287f 100644
--- a/modules/gallery/helpers/MY_html.php
+++ b/modules/gallery/helpers/MY_html.php
@@ -51,12 +51,12 @@ class html extends html_Core {
*
* Example:<pre>
* // Parameters to t() are automatically escaped by default.
- * // If the parameter is marked as safe, it won't get escaped.
+ * // If the parameter is marked as clean, it won't get escaped.
* t('Go <a href="%url">there</a>',
- * array("url" => html::mark_safe(url::current())))
+ * array("url" => html::mark_clean(url::current())))
* </pre>
*/
- static function mark_safe($html) {
+ static function mark_clean($html) {
return SafeString::of_safe_html($html);
}
diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php
index 787f8dc3..acbcb9b2 100644
--- a/modules/gallery/helpers/graphics.php
+++ b/modules/gallery/helpers/graphics.php
@@ -443,7 +443,7 @@ class graphics_Core {
if (!module::get_var("gallery", "graphics_toolkit")) {
site_status::warning(
t("Graphics toolkit missing! Please <a href=\"%url\">choose a toolkit</a>",
- array("url" => html::mark_safe(url::site("admin/graphics")))),
+ array("url" => html::mark_clean(url::site("admin/graphics")))),
"missing_graphics_toolkit");
}
}
diff --git a/modules/gallery/tests/Html_Helper_Test.php b/modules/gallery/tests/Html_Helper_Test.php
index 3623705e..bfce6dcf 100644
--- a/modules/gallery/tests/Html_Helper_Test.php
+++ b/modules/gallery/tests/Html_Helper_Test.php
@@ -32,8 +32,8 @@ class Html_Helper_Test extends Unit_Test_Case {
$this->assert_true($safe_string instanceof SafeString);
}
- public function mark_safe_test() {
- $safe_string = html::mark_safe("hello <p >world</p>");
+ public function mark_clean_test() {
+ $safe_string = html::mark_clean("hello <p >world</p>");
$this->assert_true($safe_string instanceof SafeString);
$safe_string_2 = html::clean($safe_string);
$this->assert_equal("hello <p >world</p>",
diff --git a/modules/gallery/tests/Xss_Security_Test.php b/modules/gallery/tests/Xss_Security_Test.php
index ef36f6b7..0ba5a587 100644
--- a/modules/gallery/tests/Xss_Security_Test.php
+++ b/modules/gallery/tests/Xss_Security_Test.php
@@ -195,7 +195,7 @@ class Xss_Security_Test extends Unit_Test_Case {
in_array($tokens[$token_number + 2][1],
array("clean", "purify", "js_string", "clean_attribute")) &&
self::_token_matches("(", $tokens, $token_number + 3)) {
- // Not checking for mark_safe(). We want such calls to be marked dirty (thus reviewed).
+ // Not checking for mark_clean(). We want such calls to be marked dirty (thus reviewed).
$method = $tokens[$token_number + 2][1];
$frame->expr_append("::$method(");
diff --git a/modules/gallery/views/admin_block_welcome.html.php b/modules/gallery/views/admin_block_welcome.html.php
index 71ef4368..d8c96187 100644
--- a/modules/gallery/views/admin_block_welcome.html.php
+++ b/modules/gallery/views/admin_block_welcome.html.php
@@ -5,16 +5,16 @@
<ul>
<li>
<?= t("General Settings - choose your <a href=\"%graphics_url\">graphics</a> and <a href=\"%language_url\">language</a> settings.",
- array("graphics_url" => html::mark_safe(url::site("admin/graphics")),
- "language_url" => html::mark_safe(url::site("admin/languages")))) ?>
+ array("graphics_url" => html::mark_clean(url::site("admin/graphics")),
+ "language_url" => html::mark_clean(url::site("admin/languages")))) ?>
</li>
<li>
<?= t("Appearance - <a href=\"%theme_url\">choose a theme</a>, or <a href=\"%theme_options_url\">customize the way it looks</a>.",
- array("theme_url" => html::mark_safe(url::site("admin/themes")),
- "theme_options_url" => html::mark_safe(url::site("admin/theme_options")))) ?>
+ array("theme_url" => html::mark_clean(url::site("admin/themes")),
+ "theme_options_url" => html::mark_clean(url::site("admin/theme_options")))) ?>
</li>
<li>
<?= t("Customize - <a href=\"%modules_url\">install modules</a> to add cool features!",
- array("modules_url" => html::mark_safe(url::site("admin/modules")))) ?>
+ array("modules_url" => html::mark_clean(url::site("admin/modules")))) ?>
</li>
</ul>
diff --git a/modules/gallery/views/permissions_browse.html.php b/modules/gallery/views/permissions_browse.html.php
index 231daa04..b9af9117 100644
--- a/modules/gallery/views/permissions_browse.html.php
+++ b/modules/gallery/views/permissions_browse.html.php
@@ -29,7 +29,7 @@
<ul id="gMessage">
<li class="gError">
<?= t("Oh no! Your server needs a configuration change in order for you to hide photos! Ask your server administrator to enable <a %mod_rewrite_attrs>mod_rewrite</a> and set <a %apache_attrs><i>AllowOverride FileInfo Options</i></a> to fix this.",
- array("mod_rewrite_attrs" => html::mark_safe("href=\"http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html\" target=\"_blank\"", "apache_attrs" => "href=\"http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride\" target=\"_blank\""))) ?>
+ array("mod_rewrite_attrs" => html::mark_clean("href=\"http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html\" target=\"_blank\"", "apache_attrs" => "href=\"http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride\" target=\"_blank\""))) ?>
</li>
</ul>
<? endif ?>
diff --git a/modules/gallery/views/upgrader.html.php b/modules/gallery/views/upgrader.html.php
index de6ce0e7..04200920 100644
--- a/modules/gallery/views/upgrader.html.php
+++ b/modules/gallery/views/upgrader.html.php
@@ -18,7 +18,7 @@
<h1> <?= t("That's it!") ?> </h1>
<p>
<?= t("Your <a href=\"%url\">Gallery</a> is up to date.",
- array("url" => html::mark_safe(url::site("albums/1")))) ?>
+ array("url" => html::mark_clean(url::site("albums/1")))) ?>
</p>
</div>
</div>