Bug 21986: Do not escape quotation marks when cataloguing
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 12 Dec 2018 14:05:19 +0000 (11:05 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 2 Jan 2019 10:12:37 +0000 (11:12 +0100)
commit7e21b1fd2d9e72d3b5f94bd111f0f8f2d8d7e104
tree88a3cd555c904f185ee9566f0bbe382de9abd90f
parentaa0bd18ff1c098a5becaf936d0f187dfec45fa46
Bug 21986: Do not escape quotation marks when cataloguing

In several places we escape quotation marks using
  $value =~ s/"/&quot;/g;
All the occurrences are wrong and must be removed.
Most of them are leftover of bug 11638 (Remove HTML from
addbiblio.pl), which removes the construction of html from pl scripts.

The problem has been highlighted by bug 13618, I did not track down why
the issue did not exist before (?)

Test plan:
0/ Use strings with quotation marks, like:
'Fiddle tune history : "bad" tunes'
You can also use other html characters to make the tests more complete,
like 'Fiddle tune history : <"bad" tunes>'
1/ authorities/authorities.pl
a. Edit an authority filling different fields with quotation marks
b. Edit it again
=> The display (inputs' values) is wrong, if you save the escaped quotes
will be inserted
2/ cataloguing/addbiblio.pl
Same editing a bibliographic record
3/ cataloguing/additem.pl
Same editing items
4/ members/memberentry.pl
Edit a patron's record and fill some fields with quotation marks
+ fields borrowernotes and opacnotes
=> The quotes are inserted directly in DB (escape is done before the
insert!)
5/ opac/opac-review.pl
For QA only: $js_ok_review is never used
6/ tools/batchMod.pl
For QA only: $value is always undefined at that point

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d561273ef84f4bc2534ac63d0f8793c9eb2a7fb9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 305729fdc04c723b2eb372441500d3151e1a62d3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e2cfc2615c119252e5c317059312c0d020f2924f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
authorities/authorities.pl
cataloguing/addbiblio.pl
cataloguing/additem.pl
members/memberentry.pl
opac/opac-review.pl
tools/batchMod.pl