[system] / trunk / webwork2 / lib / WeBWorK / DB / Classlist.pm Repository:
ViewVC logotype

Diff of /trunk/webwork2/lib/WeBWorK/DB/Classlist.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 376 Revision 377
143 143
144sub encode(@) { 144sub encode(@) {
145 my %hash = @_; 145 my %hash = @_;
146 my $string; 146 my $string;
147 foreach (keys %hash) { 147 foreach (keys %hash) {
148 $hash{$_} = "" unless defined $hash{$_}; # promote undef to ""
148 $hash{$_} =~ s/(=|&)/\\$1/; # escape & and = 149 $hash{$_} =~ s/(=|&)/\\$1/; # escape & and =
149 $string .= "$_=$hash{$_}&"; 150 $string .= "$_=$hash{$_}&";
150 } 151 }
151 chop $string; # remove final '&' from string for old code :p 152 chop $string; # remove final '&' from string for old code :p
152 return $string; 153 return $string;

Legend:
Removed from v.376  
changed lines
  Added in v.377

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9