From f9a11dce24d8bb266e552f5006a10f07eaf60f11 Mon Sep 17 00:00:00 2001 From: "kristian%netscape.com" Date: Thu, 1 Apr 1999 19:36:23 +0000 Subject: [PATCH] Conform to ; specifically, a comment may be wrapped into several lines, and values that end with a space should be base64 encoded. git-svn-id: svn://10.0.0.236/branches/devel-branch-1_3@25898 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/directory/perldap/LDIF.pm | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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 {