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 | |
| parent | 1880165e2e355e766835a28f78e17254dca80c4c (diff) | |
| download | rockbox-1ed48d4975632fc1b29d74fb87c87c36640daf8b.zip rockbox-1ed48d4975632fc1b29d74fb87c87c36640daf8b.tar.gz rockbox-1ed48d4975632fc1b29d74fb87c87c36640daf8b.tar.bz2 rockbox-1ed48d4975632fc1b29d74fb87c87c36640daf8b.tar.xz | |
basic slash treatment and URL-linking added
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1779 a1c6a512-1295-4272-9138-f99709370657
| -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 eb630ac..f460cff 100755 --- a/www/txt2plain.pl +++ b/www/txt2plain.pl @@ -5,7 +5,11 @@ while(<STDIN>) { $_ =~ s/\</</g; $_ =~ s/\>/>/g; - $_ =~ s/^$/\ /g; + $_ =~ s/(http:\/\/([a-zA-Z0-9_.\/-]*)[^).])/\<a href=\"$1\"\>$1\<\/a\>/g; + + $_ =~ s/^$/\ /g; # empty lines are nbsp + $_ =~ s/(\\|\/)$/$1 /g; # clobber backslash on end of line + print $_; } |