Index: openacs-4/packages/acs-tcl/catalog/acs-tcl.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/catalog/acs-tcl.en_US.ISO-8859-1.xml,v
diff -u -r1.23.6.2 -r1.23.6.3
--- openacs-4/packages/acs-tcl/catalog/acs-tcl.en_US.ISO-8859-1.xml 17 Sep 2014 07:51:48 -0000 1.23.6.2
+++ openacs-4/packages/acs-tcl/catalog/acs-tcl.en_US.ISO-8859-1.xml 24 Jun 2015 06:21:25 -0000 1.23.6.3
@@ -45,6 +45,7 @@
%name% is not a natural number, that is an integer greater than or equal to 0.
%name% is not a valid SQL identifier
%name% is not an integer
+ %name% contains non-word characters
%name% is not in the range [%min%, %max%]
%name% is too long. Please enter a value of at most %max_length% characters long. The value you entered is %actual_length% characters long.
This string looks broken!
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 -r1.30.2.15 -r1.30.2.16
--- openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 17 Sep 2014 07:51:49 -0000 1.30.2.15
+++ openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 24 Jun 2015 06:21:25 -0000 1.30.2.16
@@ -1961,7 +1961,7 @@
} {
if { [string trim $value] ne ""
&& ![regexp {[1-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]} $value]} {
- ad_complain "[_ acs-tcl.lt_name_does_not_appear__1]"
+ ad_complain [_ acs-tcl.lt_name_does_not_appear__1]
return 0
}
return 1
@@ -1979,25 +1979,30 @@
if {[string is boolean -strict $value]} {
return 1
}
- # set lcase_value [string tolower $value]
- # if {$value eq "0" || $value eq "1"
- # || $lcase_value eq "f" || $lcase_value eq "t"
- # || $lcase_value eq "y" || $lcase_value eq "n" ||
- # || $lcase_value eq "true" || $lcase_value eq "false"
- # || $lcase_value eq "yes" || $lcase_value eq "no"
- # } {
- # return 1
- # }
- ad_complain "[_ acs-tcl.lt_name_does_not_appear__2]"
+ ad_complain [_ acs-tcl.lt_name_does_not_appear__2]
return 0
}
+ad_page_contract_filter word { name value } {
+ Checks whether the value is a Tcl word, i.e. it consists of just
+ characters, digits and underscore.
+ @author Gustaf Neumann
+ @creation-date 24 June 2015
+} {
+ if {[regexp {^\w+$} $value]} {
+ return 1
+ }
+ ad_complain [_ acs-tcl.lt_name_is_not_a_word]
+ return 0
+}
+
+
####################
#
# Standard filter rules
@@ -2029,8 +2034,6 @@
}
-
-
####################
#
# Templating system things