diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/eu/mulk/mulkcms2/common/markdown/MarkdownConverter.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/eu/mulk/mulkcms2/common/markdown/MarkdownConverter.java b/src/main/java/eu/mulk/mulkcms2/common/markdown/MarkdownConverter.java index 013a5dd..859fd71 100644 --- a/src/main/java/eu/mulk/mulkcms2/common/markdown/MarkdownConverter.java +++ b/src/main/java/eu/mulk/mulkcms2/common/markdown/MarkdownConverter.java @@ -49,7 +49,12 @@ public class MarkdownConverter { public String htmlify(String markdown) { var parsedDocument = parser.parse(markdown); var uncleanHtml = renderer.render(parsedDocument); - var cleaner = new Cleaner(Safelist.relaxed().addTags("abbr", "acronym")); + var cleaner = + new Cleaner( + Safelist.relaxed() + .addTags("abbr", "acronym") + .addAttributes("abbr", "title") + .addAttributes("acronym", "title")); var cleanedDocument = cleaner.clean(Jsoup.parseBodyFragment(uncleanHtml)); cleanedDocument.select("table").addClass("pure-table").addClass("pure-table-horizontal"); return cleanedDocument.body().html(); |