]> git.koha-community.org Git - koha.git/commit
Bug 34549: Strip non-XML chars during TransformHtmlToMarc
authorDavid Cook <dcook@prosentient.com.au>
Thu, 17 Aug 2023 04:28:29 +0000 (04:28 +0000)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Tue, 17 Oct 2023 17:35:41 +0000 (17:35 +0000)
commit34dbeb9c7c8c0e373b1d164bf838f671b1c93c13
treef5fbef34a8bec19d11f10e9b9b19ad8bc6ae8182
parent42f123dae19a3178fb1d5a4e7abd6cffcc395b9c
Bug 34549: Strip non-XML chars during TransformHtmlToMarc

This patch strips non-XML characters from inputs during
TransformHtmlToMarc.

To test:
0. Apply patch
1. koha-plack --restart kohadev
2. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl
3. Fill out record and use the text from "Text file containing control characters"
as the title
4. Click Save
5. Note that your record displays without any warnings like the following:
Error: invalid data, cannot decode metadata object
parser error : PCDATA invalid Char value 27

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Squashed the tidy patch. Still needed a few spaces to satisfy qa tools.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3e1d32f9caaab56acd8f4b338a859eb599955634)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 871d6eaa3fbb5eba14e17c3ebc6a46db708e5483)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
C4/Biblio.pm
t/db_dependent/Biblio/TransformHtmlToMarc.t