only add #embed if #embed is not in requested url

This commit is contained in:
j 2013-11-16 11:48:08 +00:00
parent e8cb91e45e
commit 8417f9e886

View file

@ -1105,8 +1105,8 @@ def oembed(request):
item = get_object_or_404_json(models.Item, itemId=itemId)
embed_url = request.build_absolute_uri('/%s' % itemId)
if url.startswith(embed_url):
embed_url = '%s#embed' % url
else:
embed_url = url
if not '#embed' in embed_url:
embed_url = '%s#embed' % embed_url
oembed = {}