From bf81fbb117d13e844c8c0371a0ce22d7f78afb71 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Fri, 25 Oct 2019 23:02:50 +0200 Subject: [PATCH] Add HTML support for Micropub --- blueprints/api.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/blueprints/api.py b/blueprints/api.py index aa7d8d3..0db0431 100644 --- a/blueprints/api.py +++ b/blueprints/api.py @@ -463,6 +463,11 @@ def api_new_note() -> _Response: source = request.json["properties"]["content"][0] except (ValueError, KeyError): pass + + # Handle HTML + if isinstance(source, dict): + source = source.get("html") + try: summary = request.json["properties"]["name"][0] except (ValueError, KeyError):