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 Scott <dscott@laurentian.ca>
Wed, 12 Sep 2012 20:55:16 +0000 (16:55 -0400)
commit4c8c4a250e1ff13c46b3ab2757668faea4673f0c
treef24902e38d95d5def775b884e89a66e83a6c1876
parent5a1c5a95d8f88693cf52fddf63de6bf2c46d2508
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