diff options
author | Erik Johnston <erik@matrix.org> | 2016-06-15 16:57:48 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-06-15 16:57:48 +0100 |
commit | a60169ea0987df41ee540eefbb77cf3ff53446bc (patch) | |
tree | 2504f82208936d527099ac82db1d69fcfa55954f /synapse/rest/media | |
parent | Merge pull request #867 from matrix-org/markjh/enable_jenkins_synchrotron (diff) | |
download | synapse-a60169ea0987df41ee540eefbb77cf3ff53446bc.tar.xz |
Handle og props with not content
Diffstat (limited to 'synapse/rest/media')
-rw-r--r-- | synapse/rest/media/v1/preview_url_resource.py | 3 |
1 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 37dd1de899..fc72896e0c 100644 --- a/synapse/rest/media/v1/preview_url_resource.py +++ b/synapse/rest/media/v1/preview_url_resource.py @@ -252,7 +252,8 @@ class PreviewUrlResource(Resource): og = {} for tag in tree.xpath("//*/meta[starts-with(@property, 'og:')]"): - og[tag.attrib['property']] = tag.attrib['content'] + if 'content' in tag.attrib: + og[tag.attrib['property']] = tag.attrib['content'] # TODO: grab article: meta tags too, e.g.: |