Log in or register to post comments
Last post
tvebak's picture
Joined: 11/03/2009
Posts: 6
Re: realestate
samnol wrote:http://www.mastersmindtechnologies.com/realestate


Huh???????
tvebak's picture
Joined: 11/03/2009
Posts: 6
Re: Embed video and flash not working
Bump

Dear Developers
Do you ignore this problem?
alfonsoml's picture
Joined: 31/12/2006
Posts: 3753
Re: Embed video and flash not working
it's a problem with your server/cms, not FCKeditor.
jabcka's picture
Joined: 14/03/2009
Posts: 1
Re: Embed video and flash not working
I have the same problem.
I'm using asp pages.
Trying to add <object> tag with <param> inside. All is left after submiting is an empty embed.
How can I disable the html filter?
Thanks
tvebak's picture
Joined: 11/03/2009
Posts: 6
Re: Embed video and flash not working
alfonsoml wrote:it's a problem with your server/cms, not FCKeditor.


Can you elaborate on that?

The "CMS" I made with PHPMaker.

Information on webserver
OS: Debian Linux 4.0
Webserver: Apache 2
PHP 5.2
PHP safe-mode: Disabled
MySQL 5.0

Website: http://board.tvebak.dk/

And I have disabled "suhosin.session.cryptua" in php.ini, that didnt help either! :(
tvebak's picture
Joined: 11/03/2009
Posts: 6
Re: Embed video and flash not working
Bump
tailcast's picture
Joined: 13/05/2009
Posts: 3
Re: Embed video and flash not working
I have some similar issues.

If I try to embed a flash widget like this one from twitter:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0" width="290" height="350" id="TwitterWidget" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="http://static.twitter.com/flash/widgets/profile/TwitterWidget.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#000000" />
<param name="FlashVars" value="userID=14635642&styleURL=http://static.twitter.com/flash/widgets/profile/smooth.xml">
<embed src="http://static.twitter.com/flash/widgets/profile/TwitterWidget.swf" quality="high" bgcolor="#000000" width="290" height="350" name="TwitterWidget" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="userID=14635642&styleURL=http://static.twitter.com/flash/widgets/profile/smooth.xml"/>
</object>

Using source it is turned into this after publication:

<object width="290" height="350" data="http://static.twitter.com/flash/widgets/profile/TwitterWidget.swf" type="application/x-shockwave-flash">
<param name="allowScriptAccess" value="never">
<param name="allowNetworking" value="internal">
<param name="movie" value="http://static.twitter.com/flash/widgets/profile/TwitterWidget.swf"><embed src="http://static.twitter.com/flash/widgets/profile/TwitterWidget.swf" width="290" height="350" type="application/x-shockwave-flash" allowscriptaccess="never" allownetworking="internal"></embed></object>

using flash url it is turned into this:

<embed type="application/x-shockwave-flash" src="" allowscriptaccess="never" allownetworking="internal"></embed></p>
<p>&nbsp;</p>

few other issues with flash related to allowscriptaccess being changed to never...can't see where to change that to "always" in the config file
gkista's picture
Joined: 09/06/2009
Posts: 3
Re: Embed video and flash not working
Dear tvebak did you find a solution to that problem because i had the same problem...
i use phpmaker and the fckeditor makes me the same problem..what i want is to insert videos....
Thank you...
danielqd's picture
Joined: 18/06/2009
Posts: 1
Re: Embed video and flash not working
hi! see the file phpfn6.php linea 3344 onwards.
have to delete the contents of the array $ra1 and $ra2 in order to remove the blockade.
in the folder of template in the file zip of phpmaker program, you can change the phpfn.php


example.

// now the only remaining whitespace attacks are \t, \n, and \r
$ra1 = Array('javascript', 'vbscript', 'expression', '<applet', '<meta', '<xml', '<blink', '<link', '<style', '<script', '<embed', '<object', '<iframe', '<frame', '<frameset', '<ilayer', '<layer', '<bgsound', '<title', '<base'); // less strict
$ra2 = Array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload');
$ra = array_merge($ra1, $ra2);
$found = true; // keep replacing as long as the previous round replaced something
while ($found == true) {
$val_before = $val;
for ($i = 0; $i < sizeof($ra); $i++) {
$pattern = '/';
for ($j = 0; $j < strlen($ra[$i]); $j++) {
if ($j > 0) {
$pattern .= '(';
$pattern .= '(&#[x|X]0{0,8}([9][a][b]);?)?';
$pattern .= '|(&#0{0,8}([9][10][13]);?)?';
$pattern .= ')?';
}
$pattern .= $ra[$i][$j];
}
$pattern .= '/i';
$replacement = substr($ra[$i], 0, 2).'<x>'.substr($ra[$i], 2); // add in <> to nerf the tag
$val = preg_replace($pattern, $replacement, $val); // filter out the hex tags
if ($val_before == $val) {

// no replacements were made, so exit the loop
$found = false;
}
}
}
return $val;
}

--------------------------------------------------------------------------------------------------
// now the only remaining whitespace attacks are \t, \n, and \r
$ra1 = Array(); // -----------------------------------------------------------------------Ok
$ra2 = Array(); // -------------------------------------------------------------------------- OK
$ra = array_merge($ra1, $ra2);
$found = true; // keep replacing as long as the previous round replaced something
while ($found == true) {
$val_before = $val;
for ($i = 0; $i < sizeof($ra); $i++) {
$pattern = '/';
for ($j = 0; $j < strlen($ra[$i]); $j++) {
if ($j > 0) {
$pattern .= '(';
$pattern .= '(&#[x|X]0{0,8}([9][a][b]);?)?';
$pattern .= '|(&#0{0,8}([9][10][13]);?)?';
$pattern .= ')?';
}
$pattern .= $ra[$i][$j];
}
$pattern .= '/i';
$replacement = substr($ra[$i], 0, 2).'<x>'.substr($ra[$i], 2); // add in <> to nerf the tag
$val = preg_replace($pattern, $replacement, $val); // filter out the hex tags
if ($val_before == $val) {

// no replacements were made, so exit the loop
$found = false;
}
}
}
return $val;
}
gkista's picture
Joined: 09/06/2009
Posts: 3
Re: Embed video and flash not working
Thank you!!!!
phpwebber's picture
Joined: 17/12/2008
Posts: 14
Re: Embed video and flash not working
Ya this is a pain in the butt.

I have a button that inserts a movie into the editor. If I insert this:
<object height="480" width="640" codebase="http://www.apple.com/qtactivex/qtplugin.cab" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B">
<param value="http://localhost/files/multimedia/folder5/sample.mov" name="src" />
<param value="false" name="autoplay" />
<param value="true" name="controller" />
<param value="false" name="loop" /> <embed height="480" width="640" pluginspage="http://www.apple.com/quicktime/download/" loop="false" controller="true" autoplay="false" src="http://localhost/files/multimedia/folder5/sample.mov"></embed>  </object>


It gets stripped by FCKeditor BEFORE reaching its destination (i.e. not a php problem).

Well YouTube works:
<embed height="300" width="300" wmode="transparent" type="application/x-shockwave-flash" src="http://www.youtube.com/v/Z9387zmssuE&amp;rel=1"></embed>

When I post that, it shows up in the $_POST variable.

Soooooooooo, I thought I would drop the object definition:
<embed height="480" width="640" pluginspage="http://www.apple.com/quicktime/download/" loop="false" controller="true" autoplay="false" src="http://localhost/files/multimedia/folder5/sample.mov"></embed>


No dice. It strips that as well.

Now ALL the above code will not be stripped IF you submit the form while FCKeditor is in source code mode. (sidenote: I even tried to add a OnComplete function that switches the mode to source code prior to posting. FCKeditor saw right through my little ruse and stripped it anyway).

Now you could do this in the config file:
FCKConfig.ProtectedTags = 'embed|object|param';

This will prevent the stripping BUT you won't get any indication in the editor that the object or embed is present. So, if you have users like I do, they will add the video again and again and again.

In the end, I don't see a solution, but if you find one, I'd love to hear it.
designsbycm's picture
Joined: 11/07/2009
Posts: 2
Re: Embed video and flash not working
Visit this forum topic for help ...

viewtopic.php?f=6&t=14477

which I just posted on July 11, 2009.
gegan249's picture
Joined: 28/07/2009
Posts: 2
Re: Embed video and flash not working
danielqd wrote:hi! see the file phpfn6.php linea 3344 onwards.
have to delete the contents of the array $ra1 and $ra2 in order to remove the blockade.
in the folder of template in the file zip of phpmaker program, you can change the phpfn.php

$ra1 = Array(); // -----------------------------------------------------------------------Ok
$ra2 = Array(); // -------------------------------------------------------------------------- OK
$ra = array_merge($ra1, $ra2);

}


I tried adding your 2 lines but now the app just hangs when i try to update the record.

@danielqd

You sure that was the only 2 lines to enter? Would be lines 3347 and 3348.

Having the same <o<x>bject> problem in PHPMAKER.
gegan249's picture
Joined: 28/07/2009
Posts: 2
Re: Embed video and flash not working
Here is the fix.

On line 3792 in your PHPFN template, remove the <object and <embed references in the $ra1 array. Search for the text "$ra1 = Array"

Fixed done.