TPAC: Escape single quotes in MFHD record location user/dbs/tpac_escape_sre_label
authorDan Scott <dscott@laurentian.ca>
Thu, 6 Sep 2012 16:25:01 +0000 (12:25 -0400)
committerDan Scott <dscott@laurentian.ca>
Thu, 6 Sep 2012 16:25:01 +0000 (12:25 -0400)
commit3aed53f0d6e3ab88d063135519774f51eb8c07fb
tree4fb03b3eeb19de3bf0f01eb93f3f798f3a539027
parentc9fba6213431914723506ee666b5928522bd5094
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>
Open-ILS/src/templates/opac/parts/js.tt2