TPAC: Escape single quotes in MFHD record location user/senator/tpac_escape_sre_label
authorDan Scott <dscott@laurentian.ca>
Thu, 6 Sep 2012 16:25:01 +0000 (12:25 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 7 Sep 2012 16:19:52 +0000 (12:19 -0400)
commit95a3e7c4c5f45a9e2d88f7837c3f08bbeb57d1d1
treed84c167b6e7f689f31fd2b9ee6135969ed114b64
parentb2a479c142a55e718654cace36f8d2ccc5676d79
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>
Open-ILS/src/templates/opac/parts/js.tt2