From 2b31199c6a695ab9038998a5bf9f591ad5b68172 Mon Sep 17 00:00:00 2001 From: shish Date: Mon, 16 Jul 2007 06:50:36 +0000 Subject: [PATCH] url escape parts of link templates git-svn-id: file:///home/shish/svn/shimmie2/trunk@285 7f39781d-f577-437e-ae19-be835c7a54ca --- core/image.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/image.class.php b/core/image.class.php index 26b7ee58..5bdeba86 100644 --- a/core/image.class.php +++ b/core/image.class.php @@ -154,12 +154,13 @@ class Image { $tmpl = str_replace('$id', $this->id, $tmpl); $tmpl = str_replace('$hash', $this->hash, $tmpl); - $tmpl = str_replace('$tags', $safe_tags, $tmpl); + $tmpl = str_replace('$tags', url_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', $base_fname, $tmpl); + $tmpl = str_replace('$filename', url_escape($base_fname), $tmpl); + $tmpl = str_replace('$title', url_escape($config->get_string("title")), $tmpl); return $tmpl; }