diff --git a/mozilla/directory/perldap/LDIF.pm b/mozilla/directory/perldap/LDIF.pm index b78bcff8710..ccd96fb3602 100644 --- a/mozilla/directory/perldap/LDIF.pm +++ b/mozilla/directory/perldap/LDIF.pm @@ -1,5 +1,5 @@ ############################################################################# -# $Id: LDIF.pm,v 1.6.2.7 1999-03-22 18:05:33 kristian%netscape.com Exp $ +# $Id: LDIF.pm,v 1.6.2.8 1999-04-01 19:36:23 kristian%netscape.com Exp $ # # The contents of this file are subject to the Netscape Public License # Version 1.0 (the "License"); you may not use this file except in @@ -102,14 +102,9 @@ sub continue_line sub unpack_LDIF { my ($str, $read_ref, $option) = @_; - if ((defined $option) and ("comments" eq lc $option)) { - # Move comments down to the end of a complete value: - while ($str =~ s"((^#.*$/)+)(( .*$/)+)"$3$1"m) {} - $str =~ s"((^#.*$/)+)( .*$)"$3$/$1"m; - } else { - $str =~ s"^#.*($/|$)""gm; # ignore comments - } $str =~ s"$/ ""g; # combine continuation lines + $str =~ s"^#.*($/|$)""gm # ignore comments + unless ((defined $option) and ("comments" eq lc $option)); my (@record, $attr, $value); local $_; foreach $_ (split $/, $str) { @@ -135,7 +130,7 @@ sub unpack_LDIF return @record; } -use vars qw($_std_encode); $_std_encode = "^[:< ]|[^ -\x7E]"; +use vars qw($_std_encode); $_std_encode = '^[:< ]|[^ -\x7E]| $'; sub pack_LDIF {