[open-ils-commits] [GIT] Evergreen ILS branch master updated. 2843eb6c81f0d330f7eac7da43369538437531dc

Evergreen Git git at git.evergreen-ils.org
Fri Sep 7 14:01:44 EDT 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  2843eb6c81f0d330f7eac7da43369538437531dc (commit)
      from  4ecaab1de92e01221d223ebd9784d9d3921400d1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2843eb6c81f0d330f7eac7da43369538437531dc
Author: Dan Scott <dscott at laurentian.ca>
Date:   Thu Sep 6 12:25:01 2012 -0400

    TPAC: Escape single quotes in MFHD record location
    
    If an MFHD record contains an 852 field with a subfield containing a
    single quote, the unescaped single quote is introduced directly into the
    value of the JavaScript hash that uses single quotes as delimiters -
    thereby generating a JS exception and preventing the staff client from
    properly populating the MFHD Editor menu.
    
    This commit escapes incoming single quotes from the MFHD location field
    to prevent that from happening. The other fields in the JS hash are
    numeric and therefore should not need escaping.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/src/templates/opac/parts/js.tt2 b/Open-ILS/src/templates/opac/parts/js.tt2
index b4a775d..d6cacbe 100644
--- a/Open-ILS/src/templates/opac/parts/js.tt2
+++ b/Open-ILS/src/templates/opac/parts/js.tt2
@@ -23,7 +23,7 @@
                 [% FOR summary IN ctx.mfhd_summaries %]
                 {
                     'id' : '[% summary.sre_id %]', 
-                    'label' : '[% summary.location %]',
+                    'label' : '[% summary.location | replace("'", "\\'") %]',
                     'entryNum' : '[% loop.index %]',
                     'owning_lib' : '[% summary.owning_lib %]'
                 },

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/templates/opac/parts/js.tt2 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list