Commit 4eb270e4 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 1114395: Markdown only accepts the http and https protocols

r/a=glob
parent 41a35f6d
......@@ -230,8 +230,8 @@ sub _DoAnchors {
$url =~ s@</a$@@;
}
# Limit URL to HTTP/HTTPS links
$url = "http://$url" unless $url =~ m!^https?://!i;
my $safe_url_regexp = Bugzilla::Template::SAFE_URL_REGEXP();
$url = "http://$url" unless $url =~ /^$safe_url_regexp$/;
$self->_GenerateAnchor($whole_match, $link_text, undef, $url, $title);
}xsge;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment