Skip to content

Commit

Permalink
Tweaked URL detection slightly.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Mar 31, 2009
1 parent 68ef483 commit 8e469c9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions IcculusFinger_daemon.pl
Expand Up @@ -79,6 +79,7 @@
# 2.1.20: RSS fixes.
# 2.1.21: Fixed "finger @hostname" uninitialized variable (thanks, Thomas!).
# 2.1.22: Fixed non-html listsections output.
# 2.1.23: URL detection tweak.
#-----------------------------------------------------------------------------

# !!! TODO: If an [img] isn't in a link tag, make it link to the image.
Expand All @@ -92,7 +93,7 @@
use POSIX; # bloop.

# Version of IcculusFinger. Change this if you are forking the code.
my $version = 'v2.1.22';
my $version = 'v2.1.23';


#-----------------------------------------------------------------------------#
Expand Down Expand Up @@ -1270,7 +1271,7 @@ sub do_fingering {

if ($do_html_formatting) {
# try to make URLs into hyperlinks in the HTML output.
1 while ($output_text =~ s/(?<!href=")(?<!src=")(?<!">)\b([a-zA-Z]+?:\/\/[-~=\w&\.\/?]+)/<a href="$1">$1<\/a>/);
1 while ($output_text =~ s/(?<!href=")(?<!src=")(?<!">)\b([a-zA-Z]+?:\/\/[-~=\w&\.\/?:]+)/<a href="$1">$1<\/a>/);

# try to make email addresses into hyperlinks in the HTML output.
# !!! FIXME: broken.
Expand Down

0 comments on commit 8e469c9

Please sign in to comment.