diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-08-16 09:02:48 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-08-16 09:02:48 +0000 |
commit | 1ed48d4975632fc1b29d74fb87c87c36640daf8b (patch) | |
tree | 8f8656cfa3f578f836da3b84991c6d76f67e6f02 /www | |
parent | 1880165e2e355e766835a28f78e17254dca80c4c (diff) | |
download | rockbox-1ed48d4975632fc1b29d74fb87c87c36640daf8b.tar.gz rockbox-1ed48d4975632fc1b29d74fb87c87c36640daf8b.zip |
basic slash treatment and URL-linking added
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1779 a1c6a512-1295-4272-9138-f99709370657
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 | } |