1
0
mirror of https://github.com/djohnlewis/stackdump synced 2024-12-04 15:07:36 +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:
Samuel Lai 2014-05-17 19:34:16 +10:00
parent 7f6ed7b438
commit c020660479

View File

@ -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: