Comment on why we clone

This commit is contained in:
Erik Johnston 2016-08-02 18:41:22 +01:00
parent 9e66c58ceb
commit 6b58ade2f0

View File

@ -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",)