A quick XSS library for eliminating PHP: Stauros

Source: Internet
Author: User
A quick XSS library for eliminating PHP: Stauros

A quick XSS to remove PHP libraries.

IMPORTANT This is an experimental library, USE AT YOUR OWN RISKHow to use it

With the default settings, simply callStauros-> scanHTML ():

$ Stauros = new Stauros; $ clean = $ stauros-> scanHTML ($ dirty );

Easy as that

Working with streams

Stauros supports streaming content as well. You can use a stream as input, getting a string as output:

$ Clean = $ stauros-> scanHTMLStreamToString ($ stream );

Or you can use it as a stream to stream process:

$ Stauros-> scanHTMLStreamToStream ($ input, $ output );
Advanced Usage

The configuration class (Stauros \ HTML \ Config) allows you to specify html tag whitelists, as well as attribute whitelist and implement an attribute callback for further customization.

Project homepage:Http://www.open-open.com/lib/view/home/1441378271175

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.