Bug 11290: fix display of patron home page for certain translations
authorChris Cormack <chris@bigballofwax.co.nz>
Fri, 22 Nov 2013 22:04:00 +0000 (11:04 +1300)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 10 Dec 2013 01:23:25 +0000 (01:23 +0000)
To test
1) In a fresh Koha, generate translation into XX
2) Select XX for the staff interface (i.e. enable it, and choose it)
3) Go to the Patrons page
4) Everything looks fine
5) In the admin page, create a patron category with any non-ASCII
   character.
6) Go back to the Patrons page, everything is broken
7) Apply patch
8) regenerate translation
9) Go back to the Patrons page, everything looks fine
10) Switch to english it still looks fine

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Tried with ru-RU and fixes the problem.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Problem is also visible on untranslated templates changing
one of the sample category descriptions to include diacritics.

[RM note: I wasn't able to reproduce this on an unstranslated
 template -- I tried using Arabic, Cyrllic, and Spanish characters]

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc

index be49b95..eb02444 100644 (file)
@@ -67,8 +67,8 @@
         <p><label for="categorycode">Category: </label><select name="categorycode" id="categorycode">
                 <option value="">Any</option>[% FOREACH categorie IN categories %]
                 [% IF ( categorie.selected ) %]
-                <option value="[% categorie.categorycode %]" selected="selected">[% categorie.description %]</option>[% ELSE %]
-                <option value="[% categorie.categorycode %]">[% categorie.description %]</option>[% END %]
+                <option value="[% categorie.categorycode %]" selected="selected">[% categorie.description |html_entity %]</option>[% ELSE %]
+                <option value="[% categorie.categorycode %]">[% categorie.description |html_entity %]</option>[% END %]
                 [% END %]</select></p>
       [% END %]
   </div>