Skip to content

Commit 80c1ea7

Browse files
committed
Fix new regex pattern's flexibility
So the new pattern has the same flexibility with the original regex pattern
1 parent a91b174 commit 80c1ea7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

w3lib/html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
re.DOTALL | re.IGNORECASE,
2323
)
2424
_meta_refresh_re2 = re.compile(
25-
r'<meta\s[^>]*content\s*=\s*(?P<quote>["\'])(?P<int>(\d*\.)?\d+)\s*;\s*url=\s*(?P<url>.*?)(?P=quote)\shttp-equiv="refresh"',
25+
r'<meta\s[^>]*content\s*=\s*(?P<quote>["\'])(?P<int>(\d*\.)?\d+)\s*;\s*url=\s*(?P<url>.*?)(?P=quote)[^>]*?\shttp-equiv\s*=[^>]*refresh',
2626
re.DOTALL | re.IGNORECASE,
2727
)
2828

0 commit comments

Comments
 (0)