From ccb01e60cbc7d014c246b8580c659e6206dc8ad2 Mon Sep 17 00:00:00 2001 From: shish Date: Mon, 16 Jul 2007 16:48:35 +0000 Subject: [PATCH] oh dear :( git-svn-id: file:///home/shish/svn/shimmie2/trunk@299 7f39781d-f577-437e-ae19-be835c7a54ca --- core/image.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/image.class.php b/core/image.class.php index 31e7426e..28d609c4 100644 --- a/core/image.class.php +++ b/core/image.class.php @@ -109,7 +109,7 @@ class Image { public function get_tooltip() { global $config; - return $this->parse_link_template($config->get_string('image_tip', '$tags // $size // $filesize')); + return $this->parse_link_template($config->get_string('image_tip', '$tags // $size // $filesize'), "html_escape"); } public function get_image_filename() { @@ -139,7 +139,7 @@ class Image { return $this->ext; } - public function parse_link_template($tmpl) { + public function parse_link_template($tmpl, $_escape="url_escape") { global $config; // don't bother hitting the database if it won't be used... @@ -156,13 +156,13 @@ class Image { $tmpl = str_replace('$id', $this->id, $tmpl); $tmpl = str_replace('$hash', $this->hash, $tmpl); - $tmpl = str_replace('$tags', url_escape($safe_tags), $tmpl); + $tmpl = str_replace('$tags', $_escape($safe_tags), $tmpl); $tmpl = str_replace('$base', $base_href, $tmpl); $tmpl = str_replace('$ext', $this->ext, $tmpl); $tmpl = str_replace('$size', "{$this->width}x{$this->height}", $tmpl); $tmpl = str_replace('$filesize', to_shorthand_int($this->filesize), $tmpl); - $tmpl = str_replace('$filename', url_escape($base_fname), $tmpl); - $tmpl = str_replace('$title', url_escape($config->get_string("title")), $tmpl); + $tmpl = str_replace('$filename', $_escape($base_fname), $tmpl); + $tmpl = str_replace('$title', $_escape($config->get_string("title")), $tmpl); return $tmpl; }