This commit is contained in:
nuclearfog 2023-06-12 23:34:07 +02:00
parent b89a821ce4
commit 725d324995
No known key found for this signature in database
GPG Key ID: 03488A185C476379

View File

@ -98,8 +98,9 @@ public class MastodonStatus implements Status {
jsoupDoc.outputSettings(OUTPUT_SETTINGS);
jsoupDoc.select("br").after("\\n");
jsoupDoc.select("p").before("\\n");
String str = jsoupDoc.html().replaceAll("\\\\n", "\n");
String str = jsoupDoc.html().replace("\\n", "\n");
text = Jsoup.clean(str, "", Safelist.none(), OUTPUT_SETTINGS);
text = text.replace("&lt;", "<").replace("&gt;", ">").replace("&amp;", "&");
if (text.startsWith("\n")) {
text = text.substring(1);
}