From 8417f9e8860f267c63593c3fae47c725e2011bd0 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 16 Nov 2013 11:48:08 +0000 Subject: [PATCH] only add #embed if #embed is not in requested url --- pandora/item/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/item/views.py b/pandora/item/views.py index 1b658a0c4..f22018501 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -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 = {}