summaryrefslogtreecommitdiff
path: root/lib/VNDBUtil.pm
diff options
context:
space:
mode:
authormorkt <>2014-12-22 11:49:08 +0100
committerYorhel <git@yorhel.nl>2014-12-22 11:49:08 +0100
commit12338003bde24a3a263abe8caca71b1836ecee83 (patch)
tree81cdb33820f949f229e84ab17233420d8cb592b8 /lib/VNDBUtil.pm
parentdf383d117908160d1a84ce4519edc0c9bcf08c3b (diff)
bbcode: Replace [vcpgi][0-9]+ links with a [url] tag
Patch from https://vndb.org/t5564.13
Diffstat (limited to 'lib/VNDBUtil.pm')
-rw-r--r--lib/VNDBUtil.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDBUtil.pm b/lib/VNDBUtil.pm
index c864fda9..e81971a6 100644
--- a/lib/VNDBUtil.pm
+++ b/lib/VNDBUtil.pm
@@ -116,7 +116,7 @@ sub bb2html {
next;
}
# id
- if(($id || $exid || $longid) && (!$result || substr($raw, $last-1-length($match), 1) !~ /[\w]/) && substr($raw, $last, 1) !~ /[\w]/) {
+ if(($id || $exid || $longid) && !grep(/url/, @open) && (!$result || substr($raw, $last-1-length($match), 1) !~ /[\w]/) && substr($raw, $last, 1) !~ /[\w]/) {
(my $lnk = $match) =~ s/^d(\d+)\.(\d+)\.(\d+)$/d$1#$2.$3/;
$length += length $lnk;
last if $maxlength && $length > $maxlength;