summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-02-06 16:38:21 +0100
committerYorhel <git@yorhel.nl>2009-02-06 16:39:25 +0100
commitd8c200bea5ee38aec1a9cf46880719b98e3ff31a (patch)
tree12b85efb264ca6b30c7d11a462d1ca12856362f7 /lib
parentacdfd48d451a405ff8f5cfbda40d12bdd8d8471f (diff)
Made all BBCodes case-insensitive
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/Func.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/VNDB/Func.pm b/lib/VNDB/Func.pm
index 4c71d061..a472d2e2 100644
--- a/lib/VNDB/Func.pm
+++ b/lib/VNDB/Func.pm
@@ -116,27 +116,27 @@ sub bb2html {
my $lit = $_;
if($open[$#open] ne 'raw') {
- if ($_ eq '[raw]') { push @open, 'raw'; next }
- elsif ($_ eq '[spoiler]') { push @open, 'spoiler'; $result .= '<b class="spoiler">'; next }
- elsif ($_ eq '[quote]') {
+ if (lc$_ eq '[raw]') { push @open, 'raw'; next }
+ elsif (lc$_ eq '[spoiler]') { push @open, 'spoiler'; $result .= '<b class="spoiler">'; next }
+ elsif (lc$_ eq '[quote]') {
push @open, 'quote';
$result .= '<div class="quote">' if !$maxlength;
$rmnewline++;
next
- } elsif ($_ eq '[/spoiler]') {
+ } elsif (lc$_ eq '[/spoiler]') {
if($open[$#open] eq 'spoiler') {
$result .= '</b>';
pop @open;
}
next;
- } elsif ($_ eq '[/quote]') {
+ } elsif (lc$_ eq '[/quote]') {
if($open[$#open] eq 'quote') {
$result .= '</div>' if !$maxlength;
$rmnewline++;
pop @open;
}
next;
- } elsif($_ eq '[/url]') {
+ } elsif(lc$_ eq '[/url]') {
if($open[$#open] eq 'url') {
$result .= '</a>';
pop @open;
@@ -161,7 +161,7 @@ sub bb2html {
$result .= $_;
next;
}
- } elsif($_ eq '[/raw]') {
+ } elsif(lc$_ eq '[/raw]') {
pop @open if $open[$#open] eq 'raw';
next;
}