Skip to content

Commit

Permalink
Fix incorrect passing of flags to re.sub
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja authored Aug 8, 2023
1 parent f3f62bb commit 2893f8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion feedparser/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def feed(self, data):
:rtype: None
"""

data = re.sub(r"<!((?!DOCTYPE|--|\[))", r"&lt;!\1", data, re.IGNORECASE)
data = re.sub(r"<!((?!DOCTYPE|--|\[))", r"&lt;!\1", data, flags=re.IGNORECASE)
data = re.sub(r"<([^<>\s]+?)\s*/>", self._shorttag_replace, data)
data = data.replace("&#39;", "'")
data = data.replace("&#34;", '"')
Expand Down

0 comments on commit 2893f8f

Please sign in to comment.