Is this a bug?

I have found that, if the print swf $file variable contains a "?", that "?" get encoded to "%3F" which, in certain circumstances, breaks the URL created by $file. For instance, I needed the $file variable to look like "http://www.podtrac.com/pts/redirect.mp3?path to mp3". But when print swf is rendered it produces "http://www.podtrac.com/pts/redirect.mp3%3Fpath to mp3".

I edited line 830 of swftools.module to remove the "?" str_replace and that fixed the problem, but it seems that a "?" should be allowed in the $file variable.

Comments

SchnWalter’s picture

Title: Print SWF $file variable problem » Question mark not allowed in $file URL
Version: 6.x-2.5 » 6.x-3.x-dev
Category: bug » feature
Status: Active » Needs review

I've tested this in the latest 3.x-dev and it seems that it is not an issue anymore, you should wait for the v3 release or you can try to see if 3.x-beta4 suits your needs.

I've used this in a node that uses a php filter, and it works

$url="http://media.libsyn.com/media/livewireradio/live_wire_115.mp3";
print swf("http://www.podtrac.com/pts/redirect.mp3?$url", array('params' =>  array('height' => '24', 'width' => '300', 'bgcolor' => '1A1A1A')));

moved this to the latest 3.x-dev, so that stuart cand set it to fixed after the v3 is released

marked #499692: Question mark in URL is getting encoded and #803780: print swf, Contemplate & Podtrac code as a duplicate of this one