Bug 21053

Summary: Editing 008 field with a hash overwrites data
Product: Koha Reporter: Bernard <bernard.scaife>
Component: CatalogingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: eb, fridolin.somers, jonathan.druart, katrin.fischer, m.de.rooy, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: 008 screenshots
Bug 21053: Encode URI characters in plugin 008
Bug 21053: Encode URI characters in plugin 008
Bug 21053: Encode URI characters in plugin 008

Description Bernard 2018-07-09 10:59:35 UTC
Created attachment 76786 [details]
008 screenshots

Entering a hash (#) at any position in 008 field of a bib record causes all subsequent data in field to be overwritten with default values when record is saved.

To reproduce:
1. Find and edit a bib record which has an 008 which differs from the default values for the MARC framework
2. Choose 008 helper
3. Add # in any position before the end of the field noting the current values of the data
4. Save record
5. Edit record and select 008 helper
6. Review characters after # and note changes

See attached example screenshots
Comment 1 Jonathan Druart 2018-07-11 21:59:10 UTC
Created attachment 76873 [details] [review]
Bug 21053: Encode URI characters in plugin 008

A # (or &) at any position in 008 field of a bib record causes
all subsequent data in field to be overwritten with default values when
record is saved.

These characters need to be correctly encoded before being passed as
parameters of the url

To reproduce:
1. Find and edit a bib record which has an 008 which differs from the
default values for the MARC framework
2. Choose 008 helper
3. Add # in any position before the end of the field noting the current
values of the data
4. Save record
5. Edit record and select 008 helper
6. Review characters after #
Comment 2 Maryse Simard 2018-07-13 19:21:32 UTC
Created attachment 76961 [details] [review]
Bug 21053: Encode URI characters in plugin 008

A # (or &) at any position in 008 field of a bib record causes
all subsequent data in field to be overwritten with default values when
record is saved.

These characters need to be correctly encoded before being passed as
parameters of the url

To reproduce:
1. Find and edit a bib record which has an 008 which differs from the
default values for the MARC framework
2. Choose 008 helper
3. Add # in any position before the end of the field noting the current
values of the data
4. Save record
5. Edit record and select 008 helper
6. Review characters after #

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.
Comment 3 Katrin Fischer 2018-07-18 06:00:49 UTC
Created attachment 77064 [details] [review]
Bug 21053: Encode URI characters in plugin 008

A # (or &) at any position in 008 field of a bib record causes
all subsequent data in field to be overwritten with default values when
record is saved.

These characters need to be correctly encoded before being passed as
parameters of the url

To reproduce:
1. Find and edit a bib record which has an 008 which differs from the
default values for the MARC framework
2. Choose 008 helper
3. Add # in any position before the end of the field noting the current
values of the data
4. Save record
5. Edit record and select 008 helper
6. Review characters after #

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Nick Clemens 2018-07-19 17:37:45 UTC
Awesome work all!

Pushed to master for 18.11
Comment 5 Martin Renvoize 2018-08-02 13:44:32 UTC
Pushed to 18.05.x for 18.05.03
Comment 6 Fridolin Somers 2018-09-21 09:31:04 UTC
Pushed to 17.11.x for 17.11.10
Comment 7 Phil Ringnalda 2021-02-26 19:12:03 UTC
*** Bug 11199 has been marked as a duplicate of this bug. ***