summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwww/txt2plain.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/www/txt2plain.pl b/www/txt2plain.pl
index eb630acad0..f460cff301 100755
--- a/www/txt2plain.pl
+++ b/www/txt2plain.pl
@@ -5,7 +5,11 @@ while(<STDIN>) {
5 $_ =~ s/\</&lt;/g; 5 $_ =~ s/\</&lt;/g;
6 $_ =~ s/\>/&gt;/g; 6 $_ =~ s/\>/&gt;/g;
7 7
8 $_ =~ s/^$/\&nbsp;/g; 8 $_ =~ s/(http:\/\/([a-zA-Z0-9_.\/-]*)[^).])/\<a href=\"$1\"\>$1\<\/a\>/g;
9
10 $_ =~ s/^$/\&nbsp;/g; # empty lines are nbsp
11 $_ =~ s/(\\|\/)$/$1&nbsp;/g; # clobber backslash on end of line
12
9 13
10 print $_; 14 print $_;
11} 15}