Fix error on <a> tags without a href attribute

This commit is contained in:
miruka 2020-04-07 09:57:32 -04:00
parent e0e33649a2
commit 4961042bde

View File

@ -467,7 +467,7 @@ class HTMLProcessor:
def _matrix_to_links_add_classes(self, el: HtmlElement) -> HtmlElement: def _matrix_to_links_add_classes(self, el: HtmlElement) -> HtmlElement:
href = unquote(el.attrib.get("href")) href = unquote(el.attrib.get("href", ""))
if not href or not el.text: if not href or not el.text:
return el return el