zackexplosion / swfobject

Automatically exported from code.google.com/p/swfobject
1 stars 0 forks source link

IE9 breaks when passing in quotes for flashvars #623

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use IE9
2. Call embedSwf with flashvars that has values with double-quotes

What is the expected output? What do you see instead?
I want flashvars with working double-quotes in the values. Instead, I get some 
wacky html happening, which gives me the wrong values I want.

What version of the product are you using? On what operating system?
swfobject 2.2, IE9, windows 7 ultimate 64b

Please provide any additional information below.
I think this is how to fix it:

Look for:
par += '<param name="' + j + '" value="' + parObj[j] + '" />';

Change to:
par += '<param name="' + j + '" value="' + encodeURI(parObj[j]) + '" />';

Original issue reported on code.google.com by digitalt...@gmail.com on 12 Mar 2012 at 2:49