Skip to content

Commit

Permalink
Merge pull request #389 from hauntsaninja/hauntsaninja-patch-1
Browse files Browse the repository at this point in the history
Fix incorrect passing of flags to re.sub
  • Loading branch information
kurtmckee authored Aug 8, 2023
2 parents f3f62bb + 2893f8f commit 83b2ae7
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 83b2ae7

Please sign in to comment.