summaryrefslogtreecommitdiff
path: root/lib/VNDB/BBCode.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-09-26 13:51:11 +0200
committerYorhel <git@yorhel.nl>2019-09-26 13:51:14 +0200
commit092158fee02c3516ae08f7efcef8f1774bf823e5 (patch)
tree047b1ebe9c534291c2e246d9378dcdce75148c55 /lib/VNDB/BBCode.pm
parentd735e66d7d9b2d8c9a965ec96753864ff8c306c2 (diff)
Disallow usernames that look like DB identifiers + minor BBCode fix
A '-' before or after a DB identifier now counts as a "word character", meaning in "d5-something" won't turn that "d5" into a link.
Diffstat (limited to 'lib/VNDB/BBCode.pm')
-rw-r--r--lib/VNDB/BBCode.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/BBCode.pm b/lib/VNDB/BBCode.pm
index 3f623405..c1de1f7f 100644
--- a/lib/VNDB/BBCode.pm
+++ b/lib/VNDB/BBCode.pm
@@ -56,7 +56,7 @@ sub _link {
return ('link') if $match =~ /^[hf]t/;
# Now we're left with various forms of IDs, just need to make sure it's not surrounded by word characters
- return ('dblink') if $char_pre !~ /\w/ && $char_post !~ /\w/;
+ return ('dblink') if $char_pre !~ /[\w-]/ && $char_post !~ /[\w-]/;
();
}