]> mj.ucw.cz Git - pciids.git/commitdiff
Multilines in admin mode
authorMichal Vaner <vorner@ucw.cz>
Mon, 13 Oct 2008 19:44:26 +0000 (21:44 +0200)
committerMichal Vaner <vorner@ucw.cz>
Mon, 13 Oct 2008 19:44:26 +0000 (21:44 +0200)
PciIds/Html/Admin.pm

index 8f344ec6b97ef3981674895433a4eeb1c05f4f71..6b90c7c2015345dd00572629249cda3f6588190e 100644 (file)
@@ -31,8 +31,10 @@ use Apache2::Const qw(:common :http);
 
 sub safeEncode( $ ) {
        my( $text ) = @_;
-       return encode( $text ) if defined $text;
-       return '';
+       return '' unless defined $text;
+       $text = encode( $text );
+       $text =~ s/\n/<br>/s;
+       return $text;
 }
 
 sub mailEncode( $$ ) {