TPAC: Escape single quotes in MFHD record location
authorDan Scott <dscott@laurentian.ca>
Thu, 6 Sep 2012 16:25:01 +0000 (12:25 -0400)
committerDan Wells <dbw2@calvin.edu>
Fri, 7 Sep 2012 18:03:46 +0000 (14:03 -0400)
commit5eab979b3df377ce26c29e080683cf78e344cdc7
tree6ab07cbd62dc94ab063a4978e04a1235bcb6608e
parent3410af32019b97b92994ec1b34d0bfa45df7bffd
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@laurentian.ca>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/templates/opac/parts/js.tt2