mirror of
https://github.com/element-hq/synapse
synced 2024-08-17 16:20:53 +00:00
Comment on why we clone
This commit is contained in:
parent
9e66c58ceb
commit
6b58ade2f0
1 changed files with 1 additions and 0 deletions
|
@ -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",)
|
||||
|
|
Loading…
Reference in a new issue