mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 03:04:28 +00:00
Add HTML support for Micropub
This commit is contained in:
parent
126e5e8d59
commit
bf81fbb117
1 changed files with 5 additions and 0 deletions
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue