mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Comment on why we clone
This commit is contained in:
parent
9e66c58ceb
commit
6b58ade2f0
@ -334,6 +334,7 @@ class PreviewUrlResource(Resource):
|
|||||||
|
|
||||||
# We don't just use XPATH here as that is slow on some machines.
|
# 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"))
|
cloned_tree = deepcopy(tree.find("body"))
|
||||||
|
|
||||||
TAGS_TO_REMOVE = ("header", "nav", "aside", "footer", "script", "style",)
|
TAGS_TO_REMOVE = ("header", "nav", "aside", "footer", "script", "style",)
|
||||||
|
Loading…
Reference in New Issue
Block a user