LP1371772: Correct Escape of Library Info URL
authorJason Boyer <jboyer@library.in.gov>
Mon, 13 Feb 2017 21:59:01 +0000 (16:59 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 27 Feb 2017 14:35:01 +0000 (09:35 -0500)
Using the url filter in TT2 causes named anchors to
be escaped in such a way that urls including them
will likely return a 404. Since the url is being
used in an html document, the html filter is
sufficient and allows the url to work as intended.

Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/templates/opac/parts/library/core_info.tt2

index a47d68f..cdaf047 100644 (file)
@@ -11,7 +11,7 @@
     [%-
         lib_url = ctx.get_org_setting(ctx.library.id, 'lib.info_url');
         IF lib_url;
-            '<div id="library-url"><a href="'; lib_url | url; '" property="url">'; l('Library web site'); '</a></div>';
+            '<div id="library-url"><a href="'; lib_url | html; '" property="url">'; l('Library web site'); '</a></div>';
         END;
     -%]