mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-23 17:23:55 +00:00
Comment on why we clone
This commit is contained in:
1 parent
9e66c58ceb
commit
6b58ade2f0
1 file changed
+1
@@ -334,6 +334,7 @@ class PreviewUrlResource(Resource):
|
||||
|
||||
# We don't just use XPATH here as that is slow on some machines.
|
||||
|
||||
# We clone `tree` as we modify it.
|
||||
cloned_tree = deepcopy(tree.find("body"))
|
||||
|
||||
TAGS_TO_REMOVE = ("header", "nav", "aside", "footer", "script", "style",)
|
||||
|
||||
Reference in new issue
Block a user