Add HTML support for Micropub

This commit is contained in:
Thomas Sileo 2019-10-25 23:02:50 +02:00
parent 126e5e8d59
commit bf81fbb117

View file

@ -463,6 +463,11 @@ def api_new_note() -> _Response:
source = request.json["properties"]["content"][0] source = request.json["properties"]["content"][0]
except (ValueError, KeyError): except (ValueError, KeyError):
pass pass
# Handle HTML
if isinstance(source, dict):
source = source.get("html")
try: try:
summary = request.json["properties"]["name"][0] summary = request.json["properties"]["name"][0]
except (ValueError, KeyError): except (ValueError, KeyError):