Help: Change URL sanitization to be safer
This commit is contained in:
committed by
Yorik van Havre
parent
9b3b15ebfe
commit
55696b6a57
@@ -169,7 +169,7 @@ def location_url(url_localized: str, url_english: str) -> tuple:
|
||||
req = urllib.request.Request(url_localized)
|
||||
with urllib.request.urlopen(req) as response:
|
||||
html = response.read().decode("utf-8")
|
||||
if re.search(MD_RAW_URL, url_localized):
|
||||
if url_localized.startswith(MD_RAW_URL):
|
||||
pagename_match = re.search(r"Name/.*?:\s*(.+)", html)
|
||||
else:
|
||||
# Pages from FreeCAD Wiki fall here
|
||||
|
||||
Reference in New Issue
Block a user