From 1a0501f5e8110cda80d5d24fd7e524f3553340bf Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 3 Apr 2026 18:38:18 +0000 Subject: [PATCH] Bug 42262: encodeURIComponent for the 006 value To test: 1- have a MARC record with Type of Material "BKS - Books" that does not have an 006 defined (biblio 1 in the KTD default data will work) 2- edit the biblio in the basic editor 3- open the tag editor for the 006 4- observe that the values along the top of the tag editor window show a value of "" (blank) in position 17 5- click Save in the tag editor window 6- confirm that the values in the 006 tag end with a space 7- open the 006 tag editor again 8- observe that the values along the top of the tag editor window no longer show any value for position 17. Instead, they end with the zero in position 16 9- click Save in the tag editor window 10- confirm that the values in the 006 tag now end with a zero, not followed by a space 11- save your biblio 12- edit the biblio in the basic editor again, get warning "The following fixed-length control field(s) have an invalid length: 006. Please fix." 13- APPLY PATCH and restart_all 14. Try editing the 006 value again, the whitespace should be preserved and you get no error. Signed-off-by: Justin Swink Signed-off-by: Andrew Fuerste Henry Signed-off-by: Lucas Gass --- cataloguing/value_builder/marc21_field_006.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cataloguing/value_builder/marc21_field_006.pl b/cataloguing/value_builder/marc21_field_006.pl index 658af3ed1e..c8718ecb0f 100755 --- a/cataloguing/value_builder/marc21_field_006.pl +++ b/cataloguing/value_builder/marc21_field_006.pl @@ -37,7 +37,7 @@ my $builder = sub { function Click$function_name(event) { defaultvalue=document.getElementById(event.data.id).value; - newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_field_006.pl&index=\"+ event.data.id +\"&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes'); + newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_field_006.pl&index=\"+ event.data.id +\"&result=\"+encodeURIComponent(defaultvalue),\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes'); }