PHP的HTML內容過濾腳本 htmLawed
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.
本文由用戶 fmms 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!