Was this page helpful?

Web.CheckStyle

    Table of contents
    1. 1. Usage Restrictions
    2. 2. Parameters
    3. 3. Result
    4. 4. Samples
    web.CheckStyle(style : str) : str
    

    Check contents of style attribute for possible XSS vulnerabilities.

    Usage Restrictions

    1.9.1 or later

    Parameters

    Name Type Description
    uri str style contents to check

    Result

    The style name if there is no XSS vulnerability.
    An error, if there is an XSS vulnerability ('url()', 'http://', or expressions in the style attribute).

    Samples

      Output

    to check a style for XSS vulnerability:

    {{ web.checkstyle( '<a style=\"background-image:url(test.jpg)\" href=\"test\">HI</a>' ) }} 

     

    style contains potential XSS vulnerability Parameter name: style (click for details)

    to check a style for XSS vulnerability:

    {{ web.checkstyle( '<img src="image.jpg" style="border:1px solid black" alt="image_test"/>' ) }}  

     

    <img src="image.jpg" style="border:1px solid black" alt="image_test"/>
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by