Skip to content
Snippets Groups Projects
Commit 944a8e3d authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong: Committed by Sebastian Listl
Browse files

[Projekt: Entwicklung - Pool][TicketNr.: 2002282][Fehler von text.html2text() bei korrektem HTML]

parent 7b72f552
No related branches found
No related tags found
No related merge requests found
......@@ -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));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment