Skip to content

Commit 30ad9f0

Browse files
authored
Handle caps in redirect meta tag (boostorg#1819)
1 parent 33cf9aa commit 30ad9f0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/boostrenderer.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,13 @@ def get_meta_redirect_from_html(html_string: str) -> str | None:
4747

4848
redirect_url = None
4949
if meta_tag:
50-
meta_tag_content = meta_tag.get("content").lower()
50+
meta_tag_content = meta_tag.get("content")
5151
if meta_tag_content:
52-
redirect_url = meta_tag_content.split("url=")[1]
52+
if "URL=" in meta_tag_content:
53+
split_on = "URL="
54+
else:
55+
split_on = "url="
56+
redirect_url = meta_tag_content.split(split_on)[1]
5357

5458
return redirect_url
5559

0 commit comments

Comments
 (0)