Active
Project:
Flowplayer API
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2011 at 16:40 UTC
Updated:
8 Mar 2012 at 15:12 UTC
It seems that quotes are not always escaped correctly. The following works for me to use the viral video plugin:
flowplayer_add('#video-player', array(
'playlist' => array(
array(
'url' => '<splash_image_url>',
'scaling' => 'orig',
),
array(
'url' => '<video_url>',
'autoPlay' => FALSE, // Turn autoplay off
),
),
'plugins' => array(
'viral' => array(
'url' => 'flowplayer.viralvideos.swf',
'share' => array(
'description' => 'This is the description',
),
),
),
)
);
But when I change 'This is the description' to $vars['node']->title and the title contains an ', that breaks the player.
Comments
Comment #1
patmacs commentedYou can use $vars["node"]->title
" and ' are swappable. Or a forwardslash before the character you want to escape.
Comment #2
alienresident commentedYan,
I was having this issue when the client I was using a ' in the file names. I used preg_replace to filter and rencode (', &, +). I have adapted it for your use case but I haven't tested the code.
Comment #3
yan commentedok alienresident, but shouldn't the module do that?