diff options
Diffstat (limited to 'www')
-rwxr-xr-x | www/txt2plain.pl | 6 |
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/\</</g; | 5 | $_ =~ s/\</</g; |
6 | $_ =~ s/\>/>/g; | 6 | $_ =~ s/\>/>/g; |
7 | 7 | ||
8 | $_ =~ s/^$/\ /g; | 8 | $_ =~ s/(http:\/\/([a-zA-Z0-9_.\/-]*)[^).])/\<a href=\"$1\"\>$1\<\/a\>/g; |
9 | |||
10 | $_ =~ s/^$/\ /g; # empty lines are nbsp | ||
11 | $_ =~ s/(\\|\/)$/$1 /g; # clobber backslash on end of line | ||
12 | |||
9 | 13 | ||
10 | print $_; | 14 | print $_; |
11 | } | 15 | } |