ad_html_security_check (public)
ad_html_security_check [ -allowed_tags allowed_tags ] \ [ -allowed_attributes allowed_attributes ] \ [ -allowed_protocols allowed_protocols ] html
Defined in packages/acs-tcl/tcl/text-html-procs.tcl
Returns a human-readable explanation if the user has used any HTML tag other than the allowed ones. It uses for checking the provided values. If these values are not provided the function takes the union of the per-package instance value and the values from the "antispam" section of the kernel parameters.
- Switches:
- -allowed_tags (optional)
- -allowed_attributes (optional)
- -allowed_protocols (optional)
- Parameters:
- html (required)
- The HTML text being validated.
- Returns:
- a human-readable, plaintext explanation of what's wrong with the user's input. If everything is ok, return an empty string.
- Author:
- Lars Pind <lars@pinds.com>
- Created:
- 20 July 2000
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- ad_html_security_check_href_allowed, ad_html_security_check_forbidden_protolcols, ad_html_security_check_forbidden_tags