Index: openacs-4/packages/acs-tcl/acs-tcl.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/acs-tcl.info,v diff -u -N -r1.76 -r1.77 --- openacs-4/packages/acs-tcl/acs-tcl.info 29 Jan 2018 11:03:25 -0000 1.76 +++ openacs-4/packages/acs-tcl/acs-tcl.info 1 Feb 2018 10:35:04 -0000 1.77 @@ -9,7 +9,7 @@ f t - + OpenACS The Kernel Tcl API library. 2017-08-06 @@ -18,7 +18,7 @@ GPL version 2 3 - + Index: openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl,v diff -u -N -r1.41 -r1.42 --- openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 17 Jan 2018 22:15:51 -0000 1.41 +++ openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 1 Feb 2018 10:35:04 -0000 1.42 @@ -231,8 +231,8 @@ args } { Specifies the contract between programmer and graphic designer for a page. - When called with the magic "documentation-gathering" flag set (to - be defined), the proc will record the information about this page, so + When called with the magic "documentation-gathering" flag set + (to be defined), the proc will record the information about this page, so it can be displayed as documentation. When called during normal page execution, it will validate the query string and set corresponding variables in the caller's environment. @@ -371,16 +371,20 @@
Pluggable filter, installed by default, that makes sure the value is a natural number, i.e. non-decimal numbers >= 0. +
oneof +
Pluggable filter, installed by default, that makes sure the value X contained in + the set of the provided values. Usage example: oneof:(red|blue|green) +x
range
Pluggable filter, installed by default, that makes sure the value X is in range - [Y, Z]. To use it say something like: foo:(1|100) + [Y, Z]. Usage example: foo:(1|100)
nohtml
Pluggable filter, installed by default, that disallows any and all html.
html -
Pluggable filter, installed by default, that only allows certain, safe allowed tags to pass (see - ad_html_security_check). +
Pluggable filter, installed by default, that only allows certain, safe allowed tags to pass + (see ad_html_security_check). The purpose of screening naughty html is to prevent users from uploading HTML with tags that hijack page formatting or execute malicious code on the users's computer. @@ -1693,6 +1697,21 @@ return 1 } +ad_page_contract_filter oneof { name value set } { + Checks whether the value is contained in the set of provided values. + Example spec: w:oneof(red|green) + + @author Gustaf Neumann + @creation-date Feb, 2018 +} { + if { $value ni $set } { + ad_complain [_ acs-tcl.lt_name_is_not_valid] + return 0 + } + return 1 +} + + ad_page_contract_filter sql_identifier { name value } { Checks whether the value is a valid SQL identifier @author Lars Pind (lars@pinds.com)