iFrame stripped out

Last post 07-14-2008, 12:51 PM by StingRayYellow. 2 replies.
Sort Posts: Previous Next
  •  07-04-2008, 11:32 AM 41945

    iFrame stripped out

    Hi. First I’d like to state that I’ve been demoing several WYSIWYG interfaces over the past few months, and this cute editor has tested well above the rest. I had a few issues storing HTML into my SQL database, but solved the issue by encoding it. I have one problem that I can’t seem to find an answer to. When I submit HTML into a CE:Editor Server.HtmlEncode(CuteEditor.Text), my iframe tag is stripped out. I can submit the same HTML in an asp:textbox Server.HtmlEncode(myTextBox.Text) with no problems. I’ve noticed that CE:Editor adds a tbody tag to my code, but not sure if that is part of the problem. I’m hoping someone else has seen this before. My original HTML, & encoded text from CE:Editor and asp:TextBox are below.  I've also posted it in a text file incase it does not properly come across:
    http://209.204.80.148:8084/iframe.txt

    Thank you for reading.

     

    HTML Pasted into both CE:Editor and asp:TextBox

    <table cellpadding="0" cellspacing="0"><tr><td><table cellpadding="0" cellspacing="0" style="border-right: #cfcdc9 1px solid; border-top: #cfcdc9 1px solid; border-left: #cfcdc9 1px solid; border-bottom: #cfcdc9 1px solid"><tr><td id="lcolTop"><h2><span>Our Services</span></h2><ul><li>Sales and Marketing Programs</li><li>Targeted Internet Marketing</li><li>Lead Analysis & Database Management</li><li>Sponsorship Programs</li><li>Contract/Vendor Negotiations</li><li>Site Inspections</li><li>Design, Printing & Productions</li><li>Financial Management</li><li>Customer Service & Relations </li></ul><a id="ServicesReadMoreLink" href="default.aspx?id=20"></a></td></tr><tr><td id="lcolBottom"><h2><span>The Value of Trade Shows</span></h2><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc ultrices, ipsum condimentum pellentesque elementum, enim velit fermentum tellus, non adipiscing ligula nisl vitae metus. Sed sollicitudin hendrerit odio.<a id="TradeShowReadMoreLink" href="default.aspx?id=23"></a></p></td></tr></table></td><td style="width: 419px; height:257px"><table cellpadding="0" cellspacing="0" style="border-right: #cfcdc9 1px solid; border-top: #cfcdc9 1px solid; border-left: #cfcdc9 1px solid; border-bottom: #cfcdc9 1px solid"><tr><td id="rcolTop"><p>"Since our only service is exposition management, our focus allows us to maintain the highest standards in trade show production. We take our commitment to this industry seriously." </p><p class="quote_author" style="TEXT-ALIGN: right">-Ambrose Beirce,<br>U.S. Author, 1881-1906 </p></td></tr><tr><td><iframe scrolling="no" src="flash.aspx" style="width: 419px; height:257px"></iframe></td></tr></table></td></tr></table>

    Server.HtmlEncode(CuteEditor.Text)

    &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;

    &lt;tbody&gt;

    &lt;tr&gt;

    &lt;td&gt;

    &lt;table style=&quot;border-right: #cfcdc9 1px solid; border-top: #cfcdc9 1px solid; border-left: #cfcdc9 1px solid; border-bottom: #cfcdc9 1px solid&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;

    &lt;tbody&gt;

    &lt;tr&gt;

    &lt;td id=&quot;lcolTop&quot;&gt;

    &lt;h2&gt;Our Services&lt;/h2&gt;

    &lt;ul&gt;

    &lt;li&gt;Sales and Marketing Programs&lt;/li&gt;

    &lt;li&gt;Targeted Internet Marketing&lt;/li&gt;

    &lt;li&gt;Lead Analysis &amp;amp; Database Management&lt;/li&gt;

    &lt;li&gt;Sponsorship Programs&lt;/li&gt;

    &lt;li&gt;Contract/Vendor Negotiations&lt;/li&gt;

    &lt;li&gt;Site Inspections&lt;/li&gt;

    &lt;li&gt;Design, Printing &amp;amp; Productions&lt;/li&gt;

    &lt;li&gt;Financial Management&lt;/li&gt;

    &lt;li&gt;Customer Service &amp;amp; Relations &lt;/li&gt;

    &lt;/ul&gt;

    &lt;a id=&quot;ServicesReadMoreLink&quot; href=&quot;default.aspx?id=20&quot;&gt;&lt;/a&gt;&lt;/td&gt;

    &lt;/tr&gt;

    &lt;tr&gt;

    &lt;td id=&quot;lcolBottom&quot;&gt;

    &lt;h2&gt;The Value of Trade Shows&lt;/h2&gt;

    &lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc ultrices, ipsum condimentum pellentesque elementum, enim velit fermentum tellus, non adipiscing ligula nisl vitae metus. Sed sollicitudin hendrerit odio.&lt;a id=&quot;TradeShowReadMoreLink&quot; href=&quot;default.aspx?id=23&quot;&gt;&lt;/a&gt;&lt;/p&gt;

    &lt;/td&gt;

    &lt;/tr&gt;

    &lt;/tbody&gt;

    &lt;/table&gt;

    &lt;/td&gt;

    &lt;td style=&quot;width: 419px; height: 257px&quot;&gt;

    &lt;table style=&quot;border-right: #cfcdc9 1px solid; border-top: #cfcdc9 1px solid; border-left: #cfcdc9 1px solid; border-bottom: #cfcdc9 1px solid&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;

    &lt;tbody&gt;

    &lt;tr&gt;

    &lt;td id=&quot;rcolTop&quot;&gt;

    &lt;p&gt;&quot;Since our only service is exposition management, our focus allows us to maintain the highest standards in trade show production. We take our commitment to this industry seriously.&quot; &lt;/p&gt;

    &lt;p class=&quot;quote_author&quot; style=&quot;text-align: right&quot;&gt;-Ambrose Beirce,&lt;br /&gt;

    U.S. Author, 1881-1906 &lt;/p&gt;

    &lt;/td&gt;

    &lt;/tr&gt;

    &lt;tr&gt;

    &lt;td&gt;&lt;/td&gt;

    &lt;/tr&gt;

    &lt;/tbody&gt;

    &lt;/table&gt;

    &lt;/td&gt;

    &lt;/tr&gt;

    &lt;/tbody&gt;

    &lt;/table&gt;

    Server.HtmlEncode(myTextBox.Text)

    &lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-right: #cfcdc9 1px solid; border-top: #cfcdc9 1px solid; border-left: #cfcdc9 1px solid; border-bottom: #cfcdc9 1px solid&quot;&gt;&lt;tr&gt;&lt;td id=&quot;lcolTop&quot;&gt;&lt;h2&gt;&lt;span&gt;Our Services&lt;/span&gt;&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Sales and Marketing Programs&lt;/li&gt;&lt;li&gt;Targeted Internet Marketing&lt;/li&gt;&lt;li&gt;Lead Analysis &amp; Database Management&lt;/li&gt;&lt;li&gt;Sponsorship Programs&lt;/li&gt;&lt;li&gt;Contract/Vendor Negotiations&lt;/li&gt;&lt;li&gt;Site Inspections&lt;/li&gt;&lt;li&gt;Design, Printing &amp; Productions&lt;/li&gt;&lt;li&gt;Financial Management&lt;/li&gt;&lt;li&gt;Customer Service &amp; Relations &lt;/li&gt;&lt;/ul&gt;&lt;a id=&quot;ServicesReadMoreLink&quot; href=&quot;default.aspx?id=20&quot;&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td id=&quot;lcolBottom&quot;&gt;&lt;h2&gt;&lt;span&gt;The Value of Trade Shows&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc ultrices, ipsum condimentum pellentesque elementum, enim velit fermentum tellus, non adipiscing ligula nisl vitae metus. Sed sollicitudin hendrerit odio.&lt;a id=&quot;TradeShowReadMoreLink&quot; href=&quot;default.aspx?id=23&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;td style=&quot;width: 419px; height:257px&quot;&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-right: #cfcdc9 1px solid; border-top: #cfcdc9 1px solid; border-left: #cfcdc9 1px solid; border-bottom: #cfcdc9 1px solid&quot;&gt;&lt;tr&gt;&lt;td id=&quot;rcolTop&quot;&gt;&lt;p&gt;&quot;Since our only service is exposition management, our focus allows us to maintain the highest standards in trade show production. We take our commitment to this industry seriously.&quot; &lt;/p&gt;&lt;p class=&quot;quote_author&quot; style=&quot;TEXT-ALIGN: right&quot;&gt;-Ambrose Beirce,&lt;br&gt;U.S. Author, 1881-1906 &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;iframe scrolling=&quot;no&quot; src=&quot;flash.aspx&quot; style=&quot;width: 419px; height:257px&quot;&gt;&lt;/iframe&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

  •  07-04-2008, 4:13 PM 41950 in reply to 41945

    Re: iFrame stripped out

    Please set the following property to false.
     

    Editor.EnableStripIframeTags Property

    Specifies whether to remove inject Iframe tags before writing the string into the db. When this property is set to true (the default) Cute Editor strips all iframe tags from the html to prevent iframe injection attack.


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  07-14-2008, 12:51 PM 42209 in reply to 41950

    Re: iFrame stripped out

    Thank you for the soluition. 
View as RSS news feed in XML