浏览代码

Clarify parser used, use html.parser for BeautifulSoup parsing

Guénaël Muller 7 年前
父节点
当前提交
52220db2b4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tracim/tracim/lib/email_fetcher.py

+ 1 - 1
tracim/tracim/lib/email_fetcher.py 查看文件

87
 
87
 
88
     @classmethod
88
     @classmethod
89
     def _parse_html_body(cls, html_body: str):
89
     def _parse_html_body(cls, html_body: str):
90
-        soup = BeautifulSoup(html_body)
90
+        soup = BeautifulSoup(html_body,'html.parser')
91
         config = BEAUTIFULSOUP_HTML_BODY_PARSE_CONFIG
91
         config = BEAUTIFULSOUP_HTML_BODY_PARSE_CONFIG
92
         for tag in soup.findAll():
92
         for tag in soup.findAll():
93
             if DecodedMail._tag_to_extract(tag):
93
             if DecodedMail._tag_to_extract(tag):