Support for abbreviations

pull/153/head
M66B 7 years ago
parent 9eecb9824e
commit d62ec0a297

@ -100,7 +100,7 @@ public class HtmlHelper {
static String sanitize(Context context, String html, boolean showQuotes) { static String sanitize(Context context, String html, boolean showQuotes) {
Document parsed = Jsoup.parse(html); Document parsed = Jsoup.parse(html);
Whitelist whitelist = Whitelist.relaxed() Whitelist whitelist = Whitelist.relaxed()
.addTags("hr") .addTags("hr", "abbr")
.removeTags("col", "colgroup", "thead", "tbody") .removeTags("col", "colgroup", "thead", "tbody")
.removeAttributes("table", "width") .removeAttributes("table", "width")
.removeAttributes("td", "colspan", "rowspan", "width") .removeAttributes("td", "colspan", "rowspan", "width")
@ -178,6 +178,9 @@ public class HtmlHelper {
dd.appendElement("br").appendElement("br"); dd.appendElement("br").appendElement("br");
} }
// Abbreviations
document.select("abbr").tagName("u");
// Images // Images
for (Element img : document.select("img")) { for (Element img : document.select("img")) {
String src = img.attr("src"); String src = img.attr("src");

Loading…
Cancel
Save