summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--synapse/rest/media/v1/preview_url_resource.py2
-rw-r--r--tests/rest/media/v1/test_url_preview.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/synapse/rest/media/v1/preview_url_resource.py b/synapse/rest/media/v1/preview_url_resource.py
index 6d8c39a410..4d4b3c1462 100644
--- a/synapse/rest/media/v1/preview_url_resource.py
+++ b/synapse/rest/media/v1/preview_url_resource.py
@@ -518,7 +518,7 @@ def _calc_og(tree, media_uri):
         if "content" in tag.attrib:
             # if we've got more than 50 tags, someone is taking the piss
             if len(og) >= 50:
-                logger.warning("skipping OG for page with too many og: tags")
+                logger.warning("Skipping OG for page with too many 'og:' tags")
                 return {}
             og[tag.attrib["property"]] = tag.attrib["content"]
 
diff --git a/tests/rest/media/v1/test_url_preview.py b/tests/rest/media/v1/test_url_preview.py
index da19a8e86f..852b8ab11c 100644
--- a/tests/rest/media/v1/test_url_preview.py
+++ b/tests/rest/media/v1/test_url_preview.py
@@ -279,6 +279,7 @@ class URLPreviewTests(unittest.HomeserverTestCase):
         self.pump()
         self.assertEqual(channel.code, 200)
         res = channel.json_body
+        # We should only see the `og:description` field, as `title` is too long and should be stripped out
         self.assertCountEqual(["og:description"], res.keys())
 
     def test_ipaddr(self):