summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-06-02 11:39:24 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-06-02 11:39:24 +0800
commit993edac13d652c81acb95eb8d08a589124dc44fe (patch)
tree9e74f421f4182f76a7d39c626b100c733b97cba4
parentcbb11c9b63c01bf5c06387a1459ce33490601367 (diff)
downloadpttbbs-993edac13d652c81acb95eb8d08a589124dc44fe.tar
pttbbs-993edac13d652c81acb95eb8d08a589124dc44fe.tar.gz
pttbbs-993edac13d652c81acb95eb8d08a589124dc44fe.tar.bz2
pttbbs-993edac13d652c81acb95eb8d08a589124dc44fe.tar.lz
pttbbs-993edac13d652c81acb95eb8d08a589124dc44fe.tar.xz
pttbbs-993edac13d652c81acb95eb8d08a589124dc44fe.tar.zst
pttbbs-993edac13d652c81acb95eb8d08a589124dc44fe.zip
add lib ., fix regex for ubb
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@921 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rwxr-xr-xblog/blog.pl15
1 files changed, 8 insertions, 7 deletions
diff --git a/blog/blog.pl b/blog/blog.pl
index e0100d4e..ccfeb5c3 100755
--- a/blog/blog.pl
+++ b/blog/blog.pl
@@ -1,6 +1,7 @@
#!/usr/bin/perl
-# $Id: blog.pl,v 1.13 2003/06/02 02:09:38 in2 Exp $
+# $Id: blog.pl,v 1.14 2003/06/02 03:39:24 in2 Exp $
use CGI qw/:standard/;
+use lib qw/./;
use LocalVars;
use DB_File;
use strict;
@@ -251,12 +252,12 @@ sub applyfilter($$)
$c =~ s/\n/<br \/>\n/gs;
}
elsif( /^ubb$/i ){
- $c =~ s|\[url\](.*?)\[/url\]|<a href='\1'>\1</a>|gsi;
- $c =~ s|\[url=(.*?)\](.*?)\[/url\]|<a href='\1'>\2</a>|gsi;
- $c =~ s|\[email\](.*?)\[/email\]|<a href='mailto:\1'>\1</a>|gsi;
- $c =~ s|\[b\](.*?)\[/b\]|<b>\1</b>|gsi;
- $c =~ s|\[i\](.*?)\[/i\]|<i>\1</i>|gsi;
- $c =~ s|\[img\](.*?)\[/img\]|<img src='\1'>|gsi;
+ $c =~ s|\[url\](.*?)\[/url\]|<a href='$1'>$1</a>|gsi;
+ $c =~ s|\[url=(.*?)\](.*?)\[/url\]|<a href='$1'>$2</a>|gsi;
+ $c =~ s|\[email\](.*?)\[/email\]|<a href='mailto:$1'>$1</a>|gsi;
+ $c =~ s|\[b\](.*?)\[/b\]|<b>$1</b>|gsi;
+ $c =~ s|\[i\](.*?)\[/i\]|<i>$1</i>|gsi;
+ $c =~ s|\[img\](.*?)\[/img\]|<img src='$1'>|gsi;
}
}
return $c;