template::data::validate::richtext (public)
template::data::validate::richtext value_ref message_ref
Defined in packages/acs-templating/tcl/richtext-procs.tcl
Validate richtext after form submission.
- Parameters:
- value_ref (required)
- Reference variable to the submitted value
- message_ref (required)
- Reference variable for returning an error message
- Returns:
- True (1) if the submitted data is valid, false (0) if not
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: upvar 2 $message_ref message $value_ref richtext_list lassign $richtext_list contents format if { $format ni [template::util::richtext::formats] } { set message "Invalid format '[ns_quotehtml $format]'." return 0 } # enhanced text and HTML needs to be security checked if { $format in { text/enhanced text/html } } { set check_result [ad_html_security_check $contents] if { $check_result ne "" } { set message $check_result return 0 } } return 1XQL Not present: Generic, PostgreSQL, Oracle