diff options
author | Erik Johnston <erik@matrix.org> | 2016-08-02 18:41:22 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-08-02 18:41:22 +0100 |
commit | 6b58ade2f066beb7fa1339e494c09120b7e02976 (patch) | |
tree | f7d6681732ad290b4bff74f1a98a4b199ea7cc33 /synapse/rest/media/v1 | |
parent | Spelling. (diff) | |
download | synapse-6b58ade2f066beb7fa1339e494c09120b7e02976.tar.xz |
Comment on why we clone
Diffstat (limited to 'synapse/rest/media/v1')
-rw-r--r-- | synapse/rest/media/v1/preview_url_resource.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/rest/media/v1/preview_url_resource.py b/synapse/rest/media/v1/preview_url_resource.py index e1212313e1..64ad218f70 100644 --- a/synapse/rest/media/v1/preview_url_resource.py +++ b/synapse/rest/media/v1/preview_url_resource.py @@ -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",) |