Table of contents ▼▲
Bug 24 - The absolute link location using ':' does not seem to work
Good spot Uffe.Tiny error in a regular expression in cls_links.php
function ValidateWikiLink.
Change
preg_match("/:?.*:).*/", $opts['link'], $match);
preg_match("/:?.+:).*/", $opts['link'], $match);
Hi,
I think that:
preg_match("/:?.+:).*/", $opts['link'], $match);
preg_match("/:?.+(:).*/", $opts['link'], $match);
That is what's in that source at least and the change seems to work.
Only I'm a bit confused because I have to issue 2 times ':' in order for the absolute links to work eg. '::some/absolute/link'
But as far as I can see the documentation says that only one ':' is needed ?
[Uffe]
Correct!!! Also found another problem iwth plugin/intermap.php. There was a blank entry getting through which was picking up :<anything> as an intermap link. Add the 'continue' line as below...
foreach ($dt as $key=>$val) {
$a=split(" ", $val, 2);
$k = trim($a[0]);
if (!$k) continue;
$h = trim($a[1]);
API::AddRule($a[0], "InterMap", "/\[\[$k:(.*)\\b\]\]/", "[[$h\\1]]");
}