Skip to content

Commit

Permalink
encode conf params with encodeURIComponent so query strings can be us…
Browse files Browse the repository at this point in the history
…ed in video urls
  • Loading branch information
bradrobertson committed Sep 14, 2011
1 parent 560d84f commit 4e5d22e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/toolbox/toolbox.flashembed.js
Expand Up @@ -191,7 +191,7 @@
for (var k in conf) { for (var k in conf) {
if (conf[k]) { if (conf[k]) {
var val = conf[k]; var val = conf[k];
vars += k +'='+ (/function|object/.test(typeof val) ? f.asString(val) : val) + '&'; vars += k +'='+ encodeURIComponent(/function|object/.test(typeof val) ? f.asString(val) : val) + '&';
} }
} }
vars = vars.slice(0, -1); vars = vars.slice(0, -1);
Expand Down

1 comment on commit 4e5d22e

@jkewley
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change broke backwards compatibility for previously encoded flashvars.
Prior to this change, I could pass this text as flashvars to my movie: SOLUTIONS DE GESTION DES RÉUNIONS D'TEST
thusly:

var flashvars = {someParam:"SOLUTIONS+DE+GESTION+DES+R%c3%89UNIONS+D%e2%80%99AFFAIRES+D%27TEST",...}

but now the encoding gets re-encoded

Please sign in to comment.