承接 ircmaxell/stauros 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ircmaxell/stauros

Composer 安装命令:

composer require ircmaxell/stauros

包简介

A fast XSS cleaner for PHP

README 文档

README

Build Status

A fast XSS sanitation library for PHP.

##IMPORTANT

THIS IS AN EXPERIMENTAL LIBRARY, USE AT YOUR OWN RISK

How to use it

With the default settings, simply call Stauros->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.

统计信息

  • 总下载量: 12.38k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 118
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 117
  • Watchers: 17
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-02