LP1371772: Correct Escape of Library Info URL user/jboyer/lp1371772_info_url_escape
authorJason Boyer <jboyer@library.in.gov>
Mon, 13 Feb 2017 21:59:01 +0000 (16:59 -0500)
committerJason Boyer <jboyer@library.in.gov>
Mon, 13 Feb 2017 21:59:01 +0000 (16:59 -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>
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;
     -%]