From 3cfbf79e0c8ca57744b4d666f999caed59637c56 Mon Sep 17 00:00:00 2001 From: juanf <juanf> Date: Tue, 11 Oct 2016 14:21:02 +0000 Subject: [PATCH] SSDM-4149 : Convert special HTML characters to plain text for plain text export. SVN: 37152 --- .../eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.js index 6c69aaf63c3..dc71368bc0d 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.js @@ -342,6 +342,9 @@ $.extend(Grid.prototype, { if(!rowValue) { rowValue = ""; } else { + var specialCharsRemover = document.createElement("textarea"); + specialCharsRemover.innerHTML = rowValue; + rowValue = specialCharsRemover.value; //Removes special HTML Chars rowValue = String(rowValue).replace(/\r?\n|\r|\t/g, " "); //Remove carriage returns and tabs if(plainText === true){ rowValue = String(rowValue).replace(/<(?:.|\n)*?>/gm, ''); -- GitLab