[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ic] Stripping CR/LF from form input - Solved


> Are you sure you aren't just seeing the wrap of the textarea? 
> 
> You have to do something like:
> 
> 	catalog.cfg
> 
> 	Filter  notes  no_crlf
> 
> or
> 
> 	<input type=hidden name="mv_data_filter" value="no_crlf">
> 
> -- 
> Mike Heins
> Perusion -- Expert Interchange Consulting    http://www.perusion.com/
> phone +1.765.647.1295  tollfree 800-949-1889 <mike at perusion.com>


Hi - yes the problem was real - not just wrapping. I could see that the
notes field contained multiple lines from the mysql command line.

I did however get things working by adding this to my catalog.cg:

##########################
CodeDef no_crlf Filter
CodeDef no_crlf Routine <<EOR
 sub {
my $val = shift;
$val =~ s/[\r\n]+/ /g;
return $val;
}
EOR

Filter  notes  no_crlf
##########################


I did not realize that the

Filter	notes	no_crlf

was required. Thanks for everyone's help, especially Mike!

DB
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.