From 67b70e58b9ecdf0248555af623a633bf8286207a Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 22 Jan 2014 10:39:45 +0000 Subject: [PATCH] support embed urls without arguments, fixes #2089 --- static/js/textPanel.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/js/textPanel.js b/static/js/textPanel.js index ee88d003..bd7a2d4a 100644 --- a/static/js/textPanel.js +++ b/static/js/textPanel.js @@ -498,7 +498,9 @@ pandora.ui.textEmbed = function() { that.update = function(url) { var parsed, src; if (url) { - url = url.replace(/&/g, '&') + '&matchRatio=true'; + url = url.replace(/&/g, '&') + + (url.indexOf('#embed') < url.indexOf('?') ? '&' : '?') + + 'matchRatio=true'; src = $iframe.attr('src'); parsed = {src: Ox.parseURL(src), url: Ox.parseURL(url)}; if (