From 944a8e3d0795a8eb77620b24919fd04cdef9e18b Mon Sep 17 00:00:00 2001
From: Sebastian Pongratz <s.pongratz@adito.de>
Date: Thu, 2 Dec 2021 15:28:33 +0100
Subject: [PATCH] [Projekt: Entwicklung - Pool][TicketNr.: 2002282][Fehler von
 text.html2text() bei korrektem HTML]

---
 .../Activity_entity/entityfields/infotable/valueProcess.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/entity/Activity_entity/entityfields/infotable/valueProcess.js b/entity/Activity_entity/entityfields/infotable/valueProcess.js
index 54f2802828..7366486c34 100644
--- a/entity/Activity_entity/entityfields/infotable/valueProcess.js
+++ b/entity/Activity_entity/entityfields/infotable/valueProcess.js
@@ -2,4 +2,9 @@ import("system.result");
 import("system.vars");
 import("system.text");
 
-result.string(text.html2text(vars.get("$field.INFO")));
\ No newline at end of file
+// Remove all linebreaks
+let info = vars.get("$field.INFO").replace(/\n/ig, "");
+// Remove all styles --> styles have no effect on the later text and they and these cause problems when converting
+info = info.replace(/style=\".*\"/ig, "");
+
+result.string(text.html2text(info));
-- 
GitLab