From 7d7376a5cf8abdf7991be6e90e162f32015c4f6f Mon Sep 17 00:00:00 2001 From: miruka Date: Thu, 16 Jul 2020 11:24:42 -0400 Subject: [PATCH] Correctly handle with no src attribute --- src/backend/html_markdown.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/html_markdown.py b/src/backend/html_markdown.py index 44a3c21f..0817434c 100644 --- a/src/backend/html_markdown.py +++ b/src/backend/html_markdown.py @@ -395,7 +395,7 @@ class HTMLProcessor: if el.tag != "img": return el - src = el.attrib.get("src") + src = el.attrib.get("src", "") width = el.attrib.get("width") height = el.attrib.get("height") is_emote = "data-mx-emote" in el.attrib