[Bps-public-commit] Data-ICal branch, master, updated. def35d2fe199ca975757fcea28a2e88e86b656de

jesse jesse at bestpractical.com
Tue Apr 21 22:55:43 EDT 2009


The branch, master has been updated
       via  def35d2fe199ca975757fcea28a2e88e86b656de (commit)
      from  af012e8e0bf531e31dda7c3ecf5a612aeda48fa5 (commit)

Summary of changes:
 lib/Data/ICal/Property.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit def35d2fe199ca975757fcea28a2e88e86b656de
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Apr 22 11:55:00 2009 +0900

    Subject: [rt.cpan.org #44886] ::Property::_fold does not follow RFC
    Date: Wed, 08 Apr 2009 21:30:49 -0400
    From: Jerrad Pierce via RT <bug-Data-ICal at rt.cpan.org>
    To: undisclosed-recipients: ;
    Reply-To: bug-Data-ICal at rt.cpan.org
    RT-Originator: jpierce at cpan.org
    
    Wed Apr 08 21:30:48 2009: Request 44886 was acted upon.
    Transaction: Ticket created by JPIERCE
           Queue: Data-ICal
         Subject: ::Property::_fold does not follow RFC
       Broken in: 0.13, 0.15
        Severity: Important
           Owner: Nobody
      Requestors: jpierce at cpan.org
          Status: new
     Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=44886 >
    
    The RFC says to fold with CRLF, not LF.
    This can compound problems with some parsers.
    
    Below is a patch (against .13) to correct this. It also
    uses a tab instead of a space so that folded lines are
    more human readable, as well as trying to not break words.

diff --git a/lib/Data/ICal/Property.pm b/lib/Data/ICal/Property.pm
index 16440ea..0316fea 100644
--- a/lib/Data/ICal/Property.pm
+++ b/lib/Data/ICal/Property.pm
@@ -316,7 +316,7 @@ sub _fold {
 #        }
     } else {
         while ( $string =~ /(.{76})/ ) {
-            $string =~ s/(.{75})(.)/$1\n $2/;
+            $string =~ s/(.{64,74}\b)|(.{74})/$1\r\n\t/;
         }
     }
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list