diff --git a/webapp_post.py b/webapp_post.py index 1f1cb272e..cd176e102 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -85,9 +85,9 @@ def _htmlPostMetadataOpenGraph(domain: str, postJsonObject: {}) -> str: """Returns html OpenGraph metadata for a post """ metadata = \ - "\n" + " \n" metadata += \ - "\n" + " \n" objJson = postJsonObject if hasObjectDict(postJsonObject): objJson = postJsonObject['object'] @@ -98,23 +98,24 @@ def _htmlPostMetadataOpenGraph(domain: str, postJsonObject: {}) -> str: actorDomain, _ = getDomainFromActor(attrib) actorHandle = actorNick + '@' + actorDomain metadata += \ - "\n" if objJson.get('url'): metadata += \ - "\n" if objJson.get('published'): metadata += \ - "\n" if not objJson.get('attachment'): if objJson.get('content'): description = removeHtml(objJson['content']) metadata += \ - "\n" + " \n" metadata += \ - "\n" + " \n" return metadata # metadata for attachment @@ -138,29 +139,30 @@ def _htmlPostMetadataOpenGraph(domain: str, postJsonObject: {}) -> str: if objJson.get('content'): description += '\n\n' + removeHtml(objJson['content']) metadata += \ - "\n" + " \n" metadata += \ - "\n" + " \n" metadata += \ - "\n" metadata += \ - "\n" if attachJson.get('width'): metadata += \ - "\n" if attachJson.get('height'): metadata += \ - "\n" metadata += \ - "\n" if attachJson['mediaType'].startswith('image/'): metadata += \ - "\n" return metadata