作者:穿着拖鞋的中年男子 | 来源:互联网 | 2023-08-15 14:19
htmLawed 是一个用来对用户输入的文本内容进行过滤,使之更加安全而且符合标准的PHP脚本。过滤的内容可人工定制,可防止跨站脚本工具(XSS)。htmLawed 可限制某些标签、属性以及URL协议。
- make HTML markup in text secure and standard-compliant
- process text for use in HTML, XHTML or XML documents
- restrict HTML elements, attributes or URL protocols using black- or white-lists
- balance tags, check element nesting, transform deprecated attributes and tags, make relative URLs absolute, etc.
- fast, highly customizable, well-documented
- single, 47 kb file
- simple HTML Tidy alternative
- free and licensed under LGPL
- use to filter, secure & sanitize HTML in blog comments or forum posts, generate XML-compatible feed items from web-page excerpts, convert HTML to XHTML, pretty-print HTML, scrape web-pages, reduce spam, remove XSS code, etc.
项目主页:http://www.open-open.com/lib/view/home/1326945894202