fix: rfc2html creates a "a" tag without href for references, handle that (#4975)

This commit is contained in:
Lars Eggert 2023-01-17 18:20:13 +02:00 committed by GitHub
parent 6dd295b1a5
commit a9e3b926f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,7 +51,8 @@ validate_url = URLValidator()
def check_url_validity(attrs, new=False):
if (None, "href") not in attrs:
return None
# rfc2html creates a tags without href
return attrs
url = attrs[(None, "href")]
try:
if url.startswith("http"):