A practical guide. Pass an ampersand in a lousy file name to a Flash object on a web page.

Argghh. I have a website that offers audio previews of songs hosted elsewhere. Some file names have an ampersand in them - see below, where it passes "soundFile". Every time there is an ampersand, Flash cannot receive the file - I think it resets the file name after the ampersand. It doesn't matter if I pass it as "&". or HTML object ("& amp;")

<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>
+3
source share
1 answer

It looks like you may need to encode it rather than encode HTML code. However not sure without code. The ampersand URL encoding code is "% 26".

+8
source

Source: https://habr.com/ru/post/1697029/


All Articles