diff --git a/django_mesh/models.py b/django_mesh/models.py index 68334c7..bc87163 100644 --- a/django_mesh/models.py +++ b/django_mesh/models.py @@ -73,7 +73,7 @@ def render(self, *args, **kwargs): self.rendered_text = textile.textile(self.text) - soup = BeautifulSoup(self.rendered_text) + soup = BeautifulSoup(self.rendered_text, 'html.parser') matching_text_nodes = soup.find_all(text = re.compile(URL_REGEX)) @@ -98,7 +98,7 @@ def render(self, *args, **kwargs): else: matching_text_node.replace_with(plain_text) - soup = BeautifulSoup(soup.encode(formatter=None)) + soup = BeautifulSoup(soup.encode(formatter=None), 'html.parser') self.rendered_text = soup.encode(formatter=None).decode()