Skip to content

Commit

Permalink
Specify BeautifulSoup parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanHayes committed Jan 25, 2016
1 parent 597d6e8 commit 14805c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_mesh/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand All @@ -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()

Expand Down

0 comments on commit 14805c1

Please sign in to comment.