From 20edd68093b07d8a04ff0215ad1582d256356ce7 Mon Sep 17 00:00:00 2001
From: Shish <shish@shishnet.org>
Date: Wed, 24 Mar 2010 18:24:47 +0000
Subject: [PATCH] avoid double escapes

---
 core/imageboard.pack.php |  2 +-
 core/util.inc.php        | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/core/imageboard.pack.php b/core/imageboard.pack.php
index a9a0ec6e..559cfca8 100644
--- a/core/imageboard.pack.php
+++ b/core/imageboard.pack.php
@@ -304,7 +304,7 @@ class Image {
 	 */
 	public function get_tooltip() {
 		global $config;
-		return $this->parse_link_template($config->get_string('image_tip'), "html_escape");
+		return $this->parse_link_template($config->get_string('image_tip'), "no_escape");
 	}
 
 	/**
diff --git a/core/util.inc.php b/core/util.inc.php
index f1315cae..7b60a693 100644
--- a/core/util.inc.php
+++ b/core/util.inc.php
@@ -46,6 +46,16 @@ function sql_escape($input) {
 	return $database->db->Quote($input);
 }
 
+/**
+ * Some functions require a callback function for escaping,
+ * but we might not want to alter the data
+ *
+ * @retval string
+ */
+function no_escape($input) {
+	return $input;
+}
+
 /**
  * Turn a human readable filesize into an integer, eg 1KB -> 1024
  *