[Koha-patches] [PATCH] (bug #3411) escape authorities values

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Wed Aug 26 01:44:28 CEST 2009


From: Nahuel ANGELINETTI <nahuel.angelinetti at biblibre.com>

The values are not escaped in javascript, so if there is double quotes, the authority cannot be imported because of javascript error. This patch fix this.
---
 .../authorities/blinddetail-biblio-search.tmpl     |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tmpl
index 2fc9524..931aaa5 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tmpl
@@ -24,12 +24,12 @@
                 if (subfield){subfield.value="" ;}
             <!--TMPL_ELSE-->      
                 if(code.value=='9'){
-                        subfield.value = "<!-- TMPL_VAR NAME="authid" -->";
+                        subfield.value = "<!-- TMPL_VAR ESCAPE="JS" NAME="authid" -->";
                 }
             <!-- TMPL_LOOP NAME="0XX" -->
                 <!-- TMPL_LOOP NAME="subfield" -->
-                    if (code.value == "<!-- TMPL_VAR NAME="marc_subfield" -->"){
-                        subfield.value = "<!-- TMPL_VAR NAME="marc_value" -->";
+                    if (code.value == "<!-- TMPL_VAR ESCAPE="JS" NAME="marc_subfield" -->"){
+                        subfield.value = "<!-- TMPL_VAR ESCAPE="JS" NAME="marc_value" -->";
                     }
                 <!-- /TMPL_LOOP -->
             <!-- /TMPL_LOOP -->
-- 
1.6.0.4




More information about the Koha-patches mailing list