Question

Argghh. I have a site that offers audio previews of songs hosted elsewhere. Some file names have an ampersand in them - see below where it passes "soundFile." Anytime there's an ampersand, Flash can't get the file - I think it drops the filename after the ampersand. It doesn't matter if I pass it as an "&" or an HTML entity ("& a m p ;")

<object type="application/x-shockwave-flash" data="includes/player.swf" id="audioplayer" height="24" width="290">
<param name="movie" value="includes/player.swf"><param name="FlashVars" value="playerID=1&amp;soundFile=http://www.divideandkreate.com/mp3/Divide_&_Kreate_-_Party_Kisser.mp3">
<param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent">
</object>
Was it helpful?

Solution

Sounds like you might have to URL-encode it, rather than HTML-encode it. Not sure without the code sample though. The URL-encoded code for ampersand is '%26'.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top