}
}
-sub is_externallink ($$;$$) {
+sub is_externallink ($$;$) {
my $page = shift;
my $url = shift;
my $anchor = shift;
- my $force = shift;
if (defined $anchor) {
$url.="#".$anchor;
}
- if (! $force && $url =~ /$email_regexp/) {
+ if ($url =~ /$email_regexp/) {
# url looks like an email address, so we assume it
# is supposed to be an external link if there is no
# page with that name.
return (! (bestlink($page, linkpage($url))))
}
-
return ($url =~ /$url_regexp/)
}
my $content=$params{content};
while ($content =~ /(?<!\\)$link_regexp/g) {
- if (! is_externallink($page, $2, $3, 1)) {
+ if (! is_externallink($page, $2, $3)) {
add_link($page, linkpage($2));
}
}
mode) (smcv)
* inline: Handle obfuscated urls, such as the mailto urls generated by
markdown when forcing urls absolute.
+ * Bugfix for wikilink containing an email address not showing up in
+ brokenlinks list.
-- Joey Hess <joeyh@debian.org> Thu, 09 Jun 2011 10:06:44 -0400
[[!brokenlinks pages="*@* and !recentchanges"]]
> Weird. The bug, imho, is that `\[[email-address]]` results in a marked-up email address. I think marking up email addresses into hyperlinks should be handled by a markup plugin (e.g. markdown), not by the wikilink parser. I feel the same way for external links, but it appears [this is all by design](http://source.ikiwiki.branchable.com/?p=source.git;a=commitdiff;h=07a08122d926ab6b7741c94bc6c0038ffe0113fb). — [[Jon]]
+
+>> I belive this was done for compatability with the wikicreole plugin.
+>> Since in creole, a wikilink can contain an email or full html link,
+>> and it was easier to make ikiwiki's wikilinks do so too, rather
+>> than put entirely different link handling into creole.
+>>
+>> Anyway, I've fixed this, although it leaves some weirdness if a page
+>> is created with a name like an email address and that same email address
+>> was previously used for external links. [[done]] --[[Joey]]