madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r21429: LJSUP-11472: Asxml=true truncates newlin...

Committer: sbelyaev
LJSUP-11472: Asxml=true truncates newline characters
U   trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl	2012-03-15 14:17:19 UTC (rev 21428)
+++ trunk/cgi-bin/ljprotocol.pl	2012-03-15 14:24:53 UTC (rev 21429)
@@ -3991,6 +3991,11 @@
         # line endings
         $t->[1] =~ s/\r//g;
 
+        if ($req->{'asxml'}) {
+            my $tidy = LJ::Tidy->new();
+            $t->[1]  = $tidy->clean( $t->[1] );
+        } 
+
         if ($req->{'lineendings'} eq "unix") {
             # do nothing.  native format.
         }
@@ -4007,12 +4012,7 @@
             $t->[1] =~ s/\n/\r\n/g;
         }
 
-        if ($req->{'asxml'}) {
-            my $tidy = LJ::Tidy->new();
-            $evt->{'event'} = $tidy->clean( $t->[1] );
-        } else {
-            $evt->{'event'} = $t->[1];
-        }
+        $evt->{'event'} = $t->[1];
     }
 
     # maybe we don't need the props after all

Tags: livejournal, madeon, pl, sbelyaev
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments