Koha-clms/Koha/Template/Plugin
Kyle M Hall 8155644625 Bug 19655: Make To.json escape doesn't escape newlines to create valid JSON
JSON does not allow real line-breaks. If a field contains them and they are not escaped, a JSON parser will be unable to convert the stringified JSON back into an object.

This is clearly exemplified by the guarantor search, where a multi-line note on the guarantor's record will break the ability to select that guarantor.

Test Plan:
1) Create Patron A with a "Circulation note" that has multiple lines in it
2) Create Patron B
3) Attempt to set Patron A to be the guarantor for Patron B
4) Note selecting the patron does nothing
5) Apply this patch
6) Repeat step 3
7) Selecting the guarantor now works!

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9cd9240c36)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit efb28c4af1)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
2017-12-12 21:22:51 +13:00
..
AudioAlerts.pm Bug 11431: (QA followup) Move AudioAlerts to a separate plugin 2015-11-04 12:33:10 -03:00
AuthorisedValues.pm Bug 18512 - GetAuthorisedValues.GetByCode Template plguin should return code (not empty string) if value not found 2017-06-05 15:29:25 +02:00
Biblio.pm Bug 14610 - Add and update modules 2016-10-26 12:15:13 +00:00
Borrowers.pm Bug 16851: Move HasOverdues to Koha::Patron->has_overdues 2016-09-09 09:57:59 +00:00
Branches.pm Bug 15758: [QA Follow-up] Remove onlymine from Plugin/Branches.pm 2016-09-08 14:36:05 +00:00
Cache.pm Bug 17189: Add the ability to define several memcached namespaces - replace existing occurrences 2016-09-08 10:24:46 +00:00
Categories.pm Bug 15407: (follow-up) Koha::Patron::Categories - replace C4::Category->al 2016-09-08 13:29:22 +00:00
ColumnsSettings.pm Bug 10212: Columns configuration for tables 2014-08-26 09:28:03 -03:00
ItemTypes.pm Bug 14100: (follow-up) Language overlay for item types 2015-10-27 12:34:06 -03:00
Koha.pm Bug 11431: (QA followup) Move AudioAlerts to a separate plugin 2015-11-04 12:33:10 -03:00
KohaDates.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Price.pm Bug 12478: fix issues caused by rebasing 2016-04-26 20:20:06 +00:00
To.pm Bug 19655: Make To.json escape doesn't escape newlines to create valid JSON 2017-12-12 21:22:51 +13:00