From 6c074d791fc6e40ee944b5bab11c717093749114 Mon Sep 17 00:00:00 2001 From: hackbard Date: Sun, 15 Oct 2017 10:24:03 +0200 Subject: [PATCH 1/1] more umlaute and sonderzeichen --- utils.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/utils.js b/utils.js index 0d78e8b..a63f0af 100644 --- a/utils.js +++ b/utils.js @@ -34,14 +34,22 @@ function vert_align_text(trg) { } function html2ascii(str) { + str=str.replace(/\Ä\;/g,"Ä"); + str=str.replace(/\Ö\;/g,"Ö"); + str=str.replace(/\Ü\;/g,"Ü"); str=str.replace(/\ä\;/g,"ä"); str=str.replace(/\ö\;/g,"ö"); str=str.replace(/\ü\;/g,"ü"); str=str.replace(/\ß\;/g,"ß"); + str=str.replace(/\&\;/g,"&"); return str; } function ascii2html(str) { + str=str.replace(/&/g,"&"); + str=str.replace(/Ä/g,"Ä"); + str=str.replace(/Ö/g,"Ö"); + str=str.replace(/Ü/g,"Ü"); str=str.replace(/ä/g,"ä"); str=str.replace(/ö/g,"ö"); str=str.replace(/ü/g,"ü"); -- 2.39.2