html metadata has double quotes

merge-requests/30/head
Bob Mottram 2021-11-07 10:59:22 +00:00
parent 060311e288
commit 996a9f2c6b
1 changed files with 8 additions and 6 deletions

View File

@ -112,10 +112,11 @@ def _htmlPostMetadataOpenGraph(domain: str, postJsonObject: {}) -> str:
if objJson.get('content'):
description = removeHtml(objJson['content'])
metadata += \
" <meta content='" + description + "' name='description'>\n"
" <meta content=\"" + description + \
"\" name=\"description\">\n"
metadata += \
" <meta content='" + description + \
"' name='og:description'>\n"
" <meta content=\"" + description + \
"\" name=\"og:description\">\n"
return metadata
# metadata for attachment
@ -139,10 +140,11 @@ def _htmlPostMetadataOpenGraph(domain: str, postJsonObject: {}) -> str:
if objJson.get('content'):
description += '\n\n' + removeHtml(objJson['content'])
metadata += \
" <meta content='" + description + "' name='description'>\n"
" <meta content=\"" + description + \
"\" name=\"description\">\n"
metadata += \
" <meta content='" + description + \
"' name='og:description'>\n"
" <meta content=\"" + description + \
"\" name=\"og:description\">\n"
metadata += \
" <meta content=\"" + attachJson['url'] + \
"\" property=\"og:image\" />\n"