[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/demos/quickstart/protected/pages/Controls/ -> SafeHtml.page (source)

   1  <com:TContent ID="body" >
   2  
   3  <h1 id="4201">TSafeHtml</h1>
   4  <com:DocLink ClassPath="System.Web.UI.WebControls.TSafeHtml" />
   5  
   6  <p>
   7  <tt>TSafeHtml</tt> is a control that strips down all potentially dangerous HTML content. It is mainly a wrapper of the <a href="http://pixel-apes.com/safehtml/">SafeHTML</a> project. According to the SafeHTML project, it tries to safeguard the following situations when the string is to be displayed to end-users:
   8  </p>
   9  <ul>
  10    <li>Opening tag without its closing tag</li>
  11    <li>closing tag without its opening tag
  12    <li>any of these tags: base, basefont, head, html, body, applet, object, iframe, frame, frameset, script, layer, ilayer, embed, bgsound, link, meta, style, title, blink, xml, etc.</li>
  13    <li>any of these attributes: on*, data*, dynsrc</li>
  14    <li>javascript:/vbscript:/about: etc. protocols</li>
  15    <li>expression/behavior etc. in styles</li>
  16    <li>any other active content.</li>
  17  </ul>
  18  
  19  <p>
  20  To use <tt>TSafeHtml</tt>, simply enclose the content to be secured within the <tt>TSafeHtml</tt> component tag in a template. The content may consist of both static text and PRADO controls. If the latter, the rendering result of the controls will be secured.
  21  </p>
  22  
  23  <com:RunBar PagePath="Controls.Samples.TSafeHtml.Home" />
  24  
  25  </com:TContent>


Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7