From 28ecd418244d2974498470d7cbe45a525df14e27 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 16 Sep 2019 11:26:23 -0400 Subject: [PATCH] LP1841823 Marc flat editor repair slashes (AngJS) Replace all control field spaces with backslashes in MARC Flat text editor (AngJS edition). Signed-off-by: Bill Erickson Signed-off-by: Elaine Hardy --- Open-ILS/web/js/ui/default/staff/marcrecord.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/marcrecord.js b/Open-ILS/web/js/ui/default/staff/marcrecord.js index 9fe525b10a..2e3a422a70 100644 --- a/Open-ILS/web/js/ui/default/staff/marcrecord.js +++ b/Open-ILS/web/js/ui/default/staff/marcrecord.js @@ -297,7 +297,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, ' ') }) ); } @@ -367,7 +367,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.43.2