Closed (fixed)
Project:
SWF Tools
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Oct 2008 at 20:33 UTC
Updated:
14 Nov 2008 at 21:00 UTC
A customer installed both this module and flashnode module to post some video testimonials on their site. The FLV file was not loading however. After going through the configuration for both modules I found this code in swftools.module:
unction _swftools_get_flashvars_string(&$flashvars) {
foreach ($flashvars AS $var => $value) {
$flashvars[$var] = str_replace(array('&', '=', '?'), array('%26', '%3D', '%3
F'), $value);
}
$encoded = drupal_query_string_encode($flashvars);
// '#' seems to encode as %2523, reverse this, using a more robust hex prefix.
.
$encoded = str_replace('%2523', '0x', $encoded);
return $encoded;
The call to drupal_query_string_encode() is munging the :// in an absolute URL.
To correct this, I added the following prior to the return:
$encoded = str_replace('%3A/%252F', '://', $encoded);
If you need me to roll a patch, let me know.
Thanks!
Jer Davis
Comments
Comment #1
Stuart Greenfield commentedThanks for the post. This is was a known bug in the earlier version of SWF Tools and was fixed a few releases back. The fix that you describe is pretty similar to the one that was actually implemented. As SWF Tools is up to 5.x-2.2 now the better option is to upgrade to the latest version of the module. There are lots of other tweaks and fixes made in addition to the above.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.