From c6b0494759c0755654fcdf9125cd5717361e0167 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 16 Sep 2019 11:26:10 -0400 Subject: [PATCH] LP1841823 Marc flat editor repair slashes (Angular) Replace all control field spaces with backslashes in MARC Flat text editor, Anglular edition. Signed-off-by: Bill Erickson Signed-off-by: Elaine Hardy --- Open-ILS/src/eg2/src/assets/js/marcrecord.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/assets/js/marcrecord.js b/Open-ILS/src/eg2/src/assets/js/marcrecord.js index 04d8c74cce..97340c0602 100644 --- a/Open-ILS/src/eg2/src/assets/js/marcrecord.js +++ b/Open-ILS/src/eg2/src/assets/js/marcrecord.js @@ -15,7 +15,7 @@ */ /* - * Copy of file from Open-ILS/web/js/ui/default/staff/marcedit.js + * Copy of file from Open-ILS/web/js/ui/default/staff/marcrecord.js * * This copy of the the MARC21 library heavily modified by * Bill Erickson 2019 circa Evergreen 3.3. @@ -311,7 +311,7 @@ var MARC21 = { new MARC21.Field({ record : me, tag : line_tag(current_line), - data : cf_line_data(current_line).replace('\\',' ','g'), + data : cf_line_data(current_line).replace(/\\/g, ' ') }) ); } @@ -381,7 +381,7 @@ var MARC21 = { mtxt += this.fields.map( function (f) { if (f.isControlfield()) { - if (f.data) return '=' + f.tag + ' ' + f.data.replace(' ','\\','g'); + if (f.data) return '=' + f.tag + ' ' + f.data.replace(/ /g, '\\'); return '=' + f.tag; } else { return '=' + f.tag + ' ' + -- 2.11.0