mirror of
https://github.com/djohnlewis/stackdump
synced 2024-12-04 23:17:37 +00:00
Bad URLs are left as bad external links, rather than re-written as bad
internal links. This doesn't make much difference, but I think it is nicer to assume bad URLs are external, rather than internal.
This commit is contained in:
parent
7f6ed7b438
commit
c020660479
@ -831,7 +831,7 @@ def _rewrite_html(html, app_url_root, sites_by_urls):
|
||||
host = urllib2.Request(url).get_host()
|
||||
except ValueError:
|
||||
# invalid URL or local anchor, leaving as-is
|
||||
internal_link = True
|
||||
pass
|
||||
else:
|
||||
site = sites_by_urls.get(host, None)
|
||||
if site:
|
||||
|
Loading…
Reference in New Issue
Block a user