2010/9/20 OvermindDL1 <[email protected]>:
> On Sun, Sep 19, 2010 at 8:28 AM, yufeng <[email protected]> wrote:
>> hi:
>>  I know WFlashObject can play .swf  in wt-3.3.5.but I want to play .swf
>> EMBED article.  WTextEdit submit article embed a string like this "<dir>
>>       <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>> codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0";
>> WIDTH="550" HEIGHT="400" id="myMovieName">
>> <PARAM NAME=movie VALUE="002.swf">
>> <PARAM NAME=quality VALUE=high>
>> <PARAM NAME=bgcolor VALUE=#FFFFFF>
>> <EMBED src="002.swf" quality=high bgcolor=#FFFFFF WIDTH="550"
>> HEIGHT="400"
>> NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
>> PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer";>
>> </EMBED>
>> </OBJECT>
>>    </div> " into postgresql, and WText show it ,but only show text no
>> play *.swf .
>>  how to implement it?
>> here is html code ,can play .swf:
>>  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>> <html xmlns="http://www.w3.org/1999/xhtml";>
>> <head>
>>  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
>>  <meta http-equiv="Content-Language" content="UTF-8" />
>>  <title>flash play about .swf </title>
>> </head>
>>
>> <body>
>>    <dir>
>>     flash play about .swf
>>   <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>> codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0";
>> WIDTH="550" HEIGHT="400" id="myMovieName">
>> <PARAM NAME=movie VALUE="002.swf">
>> <PARAM NAME=quality VALUE=high>
>> <PARAM NAME=bgcolor VALUE=#FFFFFF>
>> <EMBED src="002.swf" quality=high bgcolor=#FFFFFF WIDTH="550"
>> HEIGHT="400"
>> NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
>> PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer";>
>> </EMBED>
>> </OBJECT>
>>    </div>
>> </body>
>> </html>
>
> You open with <dir>, but close with </div>, if the XML is invalid (as
> yours is), then WText will display it as text instead of as what you
> want.
>

Even with correct XML syntax (the dir/div type, but also the PARAM
fields are not closed, several quotes are missing around attributes,
...), this would not work because EMBED and OBJECT are considered
unsafe by the XSS filter. In general, it is recommended to generate
valid XML, so that you can switch to serve XHTML files if you'd ever
want to.

If you want to include a piece of HTML that Wt should include
verbatim, disable the XSS filter by setting the text format to
XHTMLUnsafeText (WText::setTextFormat(), or as a parameter in one of
the WText constructors). Note that this is potentially dangerous (as
dangerous as PHP!) if your template is not a fixed blob of text, but
is composed by concatenating user-provided input with templated parts.

Why is Wt's WFlashObject insufficient to play your swf files?

Best regards,
Wim.

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to