0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 03:03:50 +01:00

Ignore noscript tags when generating URL previews

This commit is contained in:
Maxime Vaillancourt 2017-10-25 20:44:34 -04:00
parent 1ad1ba9e6a
commit 5287e57c86

View file

@ -520,7 +520,14 @@ def _calc_og(tree, media_uri):
from lxml import etree from lxml import etree
TAGS_TO_REMOVE = ( TAGS_TO_REMOVE = (
"header", "nav", "aside", "footer", "script", "style", etree.Comment "header",
"nav",
"aside",
"footer",
"script",
"noscript",
"style",
etree.Comment
) )
# Split all the text nodes into paragraphs (by splitting on new # Split all the text nodes into paragraphs (by splitting on new