aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2019-10-31 15:17:39 +0000
committerGravatar jesopo2019-10-31 15:17:39 +0000
commit5d08a496a45040ffed968e2484090ba807a566c6 (patch)
tree633eedac7e87373d299b9d1ca8bea504883c9ba0 /modules
parentfix bitbotd `database.servers.delete` type hint issue (diff)
signature
use lxml for parsing fedi Notes. html.parse is bad and unpredictable
Diffstat (limited to 'modules')
-rw-r--r--modules/fediverse/ap_utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/fediverse/ap_utils.py b/modules/fediverse/ap_utils.py
index 934959e7..8d8dfa6e 100644
--- a/modules/fediverse/ap_utils.py
+++ b/modules/fediverse/ap_utils.py
@@ -61,7 +61,7 @@ def find_actor(username, instance):
KNOWN_TAGS = ["p", "br"]
def _normalise_note(content):
- soup = bs4.BeautifulSoup(content, "html.parser")
+ soup = bs4.BeautifulSoup(content, "lxml").body
lines = []
for element in soup.find_all():
if element.text.strip() == "":