Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -r1.94 -r1.95 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 14 May 2007 20:30:26 -0000 1.94 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 29 May 2007 15:29:15 -0000 1.95 @@ -4372,3 +4372,15 @@ } return $files } + +ad_proc -public util::string_check_urlsafe { + s1 +} { + This proc accepts a string and verifies if it is url safe. + - make sure there is no space + - make sure there is no special characters except '-' or '_' + Returns 1 if yes and 0 if not. + Meant to be used in the validation section of ad_form. +} { + return [regexp {[<>:\"|/@\#%&+\\ ]} $s1] +}