ad_page_contract_filter_proc_localurl (public)
ad_page_contract_filter_proc_localurl name value_varname
Defined in packages/acs-tcl/tcl/tcl-documentation-procs.tcl
Checks whether the value is an acceptable (non-external) url, which can be used in ad_returnredirect without throwing an error.
- Parameters:
- name (required)
- value_varname (required)
- Author:
- Gustaf Neumann
- Created:
- 19 Mai 2016
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- ad_page_contract_filters
Source code: upvar $value_varname value set valid_p 1 if { $value eq "" || [util::external_url_p $value]} { set valid_p 0 } else { try { ns_parseurl $value } on error {errMsg} { set valid_p 0 } on ok {d} { set valid_p [expr {![dict exists $d proto] || [dict get $d proto] in {http https}}] } } if {!$valid_p} { ad_complain [_ acs-tcl.lt_name_is_not_valid] } return $valid_pXQL Not present: Generic, PostgreSQL, Oracle