summary refs log tree commit diff
path: root/synapse/rest/media/v1
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-08-02 18:41:22 +0100
committerErik Johnston <erik@matrix.org>2016-08-02 18:41:22 +0100
commit6b58ade2f066beb7fa1339e494c09120b7e02976 (patch)
treef7d6681732ad290b4bff74f1a98a4b199ea7cc33 /synapse/rest/media/v1
parentSpelling. (diff)
downloadsynapse-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.py1
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",)