From ec3b0ea994407ad5ff4364532d531d3368eb72b3 Mon Sep 17 00:00:00 2001 From: in2 Date: Tue, 10 Jun 2003 08:46:06 +0000 Subject: add filter strict git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@938 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- blog/blog.pl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'blog/blog.pl') 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/\n/
\n/gs; } + elsif( /^strict$/i ){ + $c =~ s/\/>/gs; + $c =~ s/\"/"/gs; + $c =~ s/\'/'/gs; + $c =~ s/ / /gs; + } elsif( /^ubb$/i ){ $c =~ s|\[url\](.*?)\[/url\]|$1|gsi; $c =~ s|\[url=(.*?)\](.*?)\[/url\]|$2|gsi; -- cgit v1.2.3