MarkdownConverter: Permit abbr, acronym tags.
Change-Id: I5669fa48e0ff1521838ae62e2439a5feb6b1445b
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 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();