diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-06-10 16:46:06 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-06-10 16:46:06 +0800 |
commit | ec3b0ea994407ad5ff4364532d531d3368eb72b3 (patch) | |
tree | 110bc54ec7053a41ed3f82c5a5ea355384f7a064 /blog | |
parent | 3e2731266e2134c841aa204bd59892092899634a (diff) | |
download | pttbbs-ec3b0ea994407ad5ff4364532d531d3368eb72b3.tar pttbbs-ec3b0ea994407ad5ff4364532d531d3368eb72b3.tar.gz pttbbs-ec3b0ea994407ad5ff4364532d531d3368eb72b3.tar.bz2 pttbbs-ec3b0ea994407ad5ff4364532d531d3368eb72b3.tar.lz pttbbs-ec3b0ea994407ad5ff4364532d531d3368eb72b3.tar.xz pttbbs-ec3b0ea994407ad5ff4364532d531d3368eb72b3.tar.zst pttbbs-ec3b0ea994407ad5ff4364532d531d3368eb72b3.zip |
add filter strict
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@938 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'blog')
-rwxr-xr-x | blog/blog.pl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/blog/blog.pl b/blog/blog.pl index c14ca34a..0dc59914 100755 --- a/blog/blog.pl +++ b/blog/blog.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: blog.pl,v 1.18 2003/06/03 07:06:59 in2 Exp $ +# $Id: blog.pl,v 1.19 2003/06/10 08:46:06 in2 Exp $ use CGI qw/:standard/; use lib qw/./; use LocalVars; @@ -251,11 +251,15 @@ sub applyfilter($$) my($c, $filter) = @_; foreach( split(',', $filter) ){ if( /^generic$/i ){ - #$c =~ s/\</</gs; - #$c =~ s/\>/>/gs; - #$c =~ s/\"/"/gs; $c =~ s/\n/<br \/>\n/gs; } + elsif( /^strict$/i ){ + $c =~ s/\</</gs; + $c =~ s/\>/>/gs; + $c =~ s/\"/"/gs; + $c =~ s/\'/'/gs; + $c =~ s/ / /gs; + } elsif( /^ubb$/i ){ $c =~ s|\[url\](.*?)\[/url\]|<a href="$1">$1</a>|gsi; $c =~ s|\[url=(.*?)\](.*?)\[/url\]|<a href="$1">$2</a>|gsi; |