Skip to content

Commit

Permalink
Also truncate at an ASCII NUL, as suggested by Kevin Walsh. This could
Browse files Browse the repository at this point in the history
be considered a "bugfix" since a NUL mostly likely represents a delimiter
between multiple form values and thus the end of a "line".
  • Loading branch information
jonjensen committed Nov 10, 2005
1 parent 136191d commit ab137dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/Filter/oneline.filter
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Copyright 2005 Interchange Development Group (http://www.icdevgroup.org/)
# Licensed under the GNU GPL v2. See file LICENSE for details.
# $Id: oneline.filter,v 1.1 2005-10-08 10:33:08 jon Exp $
# $Id: oneline.filter,v 1.2 2005-11-10 02:39:26 jon Exp $

CodeDef oneline Filter
CodeDef oneline Description Truncate at first newline (CR or LF)
CodeDef oneline Description Truncate at first newline (CR or LF) or ASCII NUL
CodeDef oneline Visibility public
CodeDef oneline Routine <<EOR
sub {
my $val = shift;
$val =~ s/[\r\n].*//s;
$val =~ s/[\r\n\0].*//s;
return $val;
}
EOR

0 comments on commit ab137dd

Please sign in to comment.