X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=publishing%2Forg.argeo.publishing.ui%2Fsrc%2Forg%2Fargeo%2Fdocbook%2Fui%2FDbkTextInterpreter.java;h=eafddd9243dddb232afaa4b5b44a0d2f6028358a;hb=f4c6893c66cd619e699cb9392ff8c45367796154;hp=2717a38b024f16af25282b645f7b34e8bb1d4860;hpb=70010c4afc5799622fcad5b075740d94da074798;p=gpl%2Fargeo-suite.git diff --git a/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/DbkTextInterpreter.java b/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/DbkTextInterpreter.java index 2717a38..eafddd9 100644 --- a/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/DbkTextInterpreter.java +++ b/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/DbkTextInterpreter.java @@ -88,6 +88,22 @@ public class DbkTextInterpreter implements TextInterpreter { public String readSimpleHtml(Item item) { String raw = raw(item); + // FIXME the saved data should be corrected instead. + if (raw.indexOf('&') >= 0) { + raw = raw.replace("&", "&"); + } + if (raw.indexOf('<') >= 0) { + raw = raw.replace("<", "<"); + } + if (raw.indexOf('>') >= 0) { + raw = raw.replace(">", ">"); + } + if (raw.indexOf('\"') >= 0) { + raw = raw.replace("\"", """); + } + if (raw.indexOf('\'') >= 0) { + raw = raw.replace("\'", "'"); + } // raw = "" + raw + ""; if (raw.length() == 0) return raw;