Skip to content

Commit

Permalink
fixed issue with multiget escaping the comma delimited list of urls
Browse files Browse the repository at this point in the history
  • Loading branch information
tomboetig committed Oct 8, 2010
1 parent 3adb6c0 commit d824f99
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions jquery.embedly.js
Expand Up @@ -41,6 +41,7 @@
settings = $.extend({
maxWidth: null,
maxHeight: null,
wmode: null,
method: "replace",
addImageStyles: true,
wrapElement: 'div',
Expand Down Expand Up @@ -140,6 +141,7 @@
settings = $.extend({
maxWidth: null,
maxHeight: null,
wmode: null,
method: "replace",
addImageStyles: true,
wrapElement: 'div',
Expand Down Expand Up @@ -182,16 +184,13 @@
"height": e.node.parent().height()
};
}
return e.url;
return encodeURIComponent(e.url);
}).join(',');
data = {
format: 'json',
urls: urls
};
if (settings.maxWidth !== null) {data.maxwidth = settings.maxWidth;}
else if (typeof dimensions != "undefined") { data.maxwidth = dimensions.width;} // we really only need to limit the width.
if (settings.maxHeight !== null) {data.maxheight = settings.maxHeight;} // Most containers have variable height
if (settings.wmode !== null) { data.wmode = settings.wmode;} // If you're concerned about height, set a maxheight
data = 'urls='+urls;
if (settings.maxWidth !== null) {data += '&maxwidth='+ settings.maxWidth;}
else if (typeof dimensions != "undefined") { data += '&maxwidth='+ dimensions.width;} // we really only need to limit the width.
if (settings.maxHeight !== null) {data += '&maxheight=' +settings.maxHeight;} // Most containers have variable height
if (settings.wmode !== null) { data += '&wmode='+ settings.wmode;} // If you're concerned about height, set a maxheight
embed = function(oembed, dict) {
var _a, code, style, title;
if ((_a = oembed.type) === 'photo') {
Expand Down

0 comments on commit d824f99

Please sign in to comment.