r9244 - /scripts/qa/qareport-chlog.cgi

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Mon Nov 12 21:33:56 UTC 2007


Author: dmn
Date: Mon Nov 12 21:33:56 2007
New Revision: 9244

URL: http://svn.debian.org/wsvn/?sc=1&rev=9244
Log:
Replace newlines wirh <br/>; We return (some sort of) xhtml after all

Modified:
    scripts/qa/qareport-chlog.cgi

Modified: scripts/qa/qareport-chlog.cgi
URL: http://svn.debian.org/wsvn/scripts/qa/qareport-chlog.cgi?rev=9244&op=diff
==============================================================================
--- scripts/qa/qareport-chlog.cgi (original)
+++ scripts/qa/qareport-chlog.cgi Mon Nov 12 21:33:56 2007
@@ -26,7 +26,11 @@
     my $xhtmlp = $cgi->Accept("application/xhtml+xml");
 
     print $cgi->header(
-        -content_type   => 'text/plain; charset=utf-8',
+        -content_type   => (
+            ($xhtmlp and $xhtmlp > $htmlp)
+            ? 'application/xhtml+xml; charset=utf-8'
+            : 'text/html; charset=utf-8'
+        ),
     );
 }
 
@@ -103,6 +107,7 @@
 $text =~ s/'/&quot;/g;
 $text =~ s/</&lt;/g;
 $text =~ s/>/&gt;/g;
+$text =~ s{\r?\n}{<br/>}g;
 
 print $text;
 




More information about the Pkg-perl-cvs-commits mailing list