Bugzilla – Attachment 194170 Details for
Bug 35104
We should warn when attempting to save MARC records that contain characters invalid in XML
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35104: Remove silent pre-emptive StripNonXmlChars call from TransformHtmlToMarc
5a466e1.patch (text/plain), 1.64 KB, created by
Martin Renvoize (ashimema)
on 2026-02-27 19:24:18 UTC
(
hide
)
Description:
Bug 35104: Remove silent pre-emptive StripNonXmlChars call from TransformHtmlToMarc
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2026-02-27 19:24:18 UTC
Size:
1.64 KB
patch
obsolete
>From 5a466e14007e46d08c4032e5d237e31aad4c8556 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Fri, 27 Feb 2026 14:49:38 +0000 >Subject: [PATCH] Bug 35104: Remove silent pre-emptive StripNonXmlChars call > from TransformHtmlToMarc > >The call was only applied to the first subfield of a newly-created MARC >field (the elsif branch), not to subsequent subfields added to an existing >field, making the stripping incomplete and inconsistent. It was also >never imported, causing an "Undefined subroutine" crash on any save via >the MARC editor. > >Non-XML character stripping is now handled entirely by >Koha::Biblio::Metadata::store(), which operates on the complete MARC XML, >records each stripped character as a biblio_metadata_errors row, and logs >a warning - giving cataloguers and administrators full visibility. >--- > C4/Biblio.pm | 2 -- > 1 file changed, 2 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index d59fe9f8333..af06743dbc1 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -88,7 +88,6 @@ use C4::Charset qw( > nsb_clean > SetMarcUnicodeFlag > SetUTF8Flag >- StripNonXmlChars > ); > use C4::Languages; > use C4::Linker; >@@ -2351,7 +2350,6 @@ sub TransformHtmlToMarc { > if ( $fval ne '' && $newfield ) { > $newfield->add_subfields( $fkey => $fval ); > } elsif ( $fval ne '' ) { >- $fval = StripNonXmlChars($fval); #Strip out any non-XML characters like control characters > $newfield = MARC::Field->new( $tag, $ind1, $ind2, $fkey => $fval ); > } > $j += 2; >-- >2.53.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35104
:
157625
|
157627
|
157628
|
157642
|
159615
|
159620
|
159621
|
159630
|
159810
|
159811
|
159812
|
159813
|
166431
|
173145
|
173146
|
176820
|
176821
|
176850
|
176851
|
176852
|
176860
|
193985
|
193986
|
193987
|
193988
|
193989
|
193990
|
193991
|
193992
|
193993
|
193994
|
193995
|
193996
|
193997
|
193998
|
193999
|
194000
|
194001
|
194004
|
194005
|
194006
|
194007
|
194008
|
194009
|
194010
|
194011
|
194012
|
194013
|
194152
|
194153
|
194154
|
194155
|
194156
|
194157
|
194158
|
194159
|
194160
|
194161
|
194162
|
194163
|
194164
|
194165
|
194166
|
194167
|
194168
|
194169
| 194170 |
194171
|
194172