]> Dogcows Code - chaz/p5-CGI-Ex/blobdiff - lib/CGI/Ex/validate.js
CGI::Ex 2.07
[chaz/p5-CGI-Ex] / lib / CGI / Ex / validate.js
index d8a62704c4bfdfe04b9ac0f212f0187d46e5fe94..124cad9dc00bfa64bd4f2f6009af8445f8c76c8a 100644 (file)
@@ -1,10 +1,10 @@
 /**----------------------------------------------------------------***
-*  Copyright 2006 - Paul Seamons                                     *
+*  Copyright 2007 - Paul Seamons                                     *
 *  Distributed under the Perl Artistic License without warranty      *
 *  Based upon CGI/Ex/Validate.pm v1.14 from Perl                     *
 *  For instructions on usage, see perldoc of CGI::Ex::Validate       *
 ***----------------------------------------------------------------**/
-// $Revision: 1.36 $
+// $Revision: 1.38 $
 
 function Validate () {
  this.error             = vob_error;
@@ -303,6 +303,8 @@ function vob_validate_buddy (form, field, field_val, N_level, ifs_match) {
    if (typeof(values[i]) == 'undefined') continue;
    if (! this.filter_types('do_not_trim',types).length)
      values[i] = values[i].replace('^\\s+','').replace(new RegExp('\\s+$',''),'');
+   if (this.filter_types('trim_control_chars',types).length)
+     values[i] = values[i].replace(new RegExp('\t', 'g'),' ').replace(new RegExp('[^\x00-\x1F]+','g'),'');
    if (this.filter_types('to_upper_case',types).length) {
      values[i] = values[i].toUpperCase();
    } else if (this.filter_types('to_lower_case',types).length) {
This page took 0.027427 seconds and 4 git commands to generate.