I had installed JW player and wanted to install viral-2 plugins, so I added the plugins to the flashvars array, e.g:

<?php
print swf('test1.flv', array('params' => array('width' => '400', 'height' => '300'), 'flashvars' => array('image' => 'picture.jpg', 'plugins' => 'viral-2', 'viral.functions' => 'embed,link')));
?>

Is it correctly written, btw?

Somehow in HTML it produced a carriage return which is visible via swfobject as \r\n\r\n\r\n. One instance (\n) is added prior to &plugins part and 3 (\r\n\r\n\r\n) are added to the end of the .flv url part. This makes Chrome and Safari complains about invalid XML file. Firefox simply ignores it.

But when I added the plugins directly to wijering4.module (function wijering4_swftools_flashvars), no carriage returns produced and all browsers say okay. Since I do not want to touch the module, so I need a hand to solve it.

I have tried to strip_replace it, but no luck so far. Any hint? Thanks