This changes [ foo | FrontPage ] so instead of linking to "FrontPage" it now links to "foo" and everything after the pipe is hidden. (Ideally I'd like it to link to a page called "foo | FrontPage", but I can't see how to do that and it's probably be a "bad" url).
Anyway, am I looking in the right place to stop named links, and is this the best way to do it?
Thanks :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you want to disallow external named links
(like [ name | http://wazoo.com/ ]) as well as
internal named links ([ name | WikiWord ]),
replace (in lib/stdlib.php):
Hi all :)
I was wonder what the best way to stop named links inside the wiki? I the best way to stop it so far is to change line 265 in stdlib.php from
preg_match("/([^|]+)(\|)?([^|]+)?/", $match[2], $matches);
to
preg_match("/([^|]+)?([^|]+)?/", $match[2], $matches);
This changes [ foo | FrontPage ] so instead of linking to "FrontPage" it now links to "foo" and everything after the pipe is hidden. (Ideally I'd like it to link to a page called "foo | FrontPage", but I can't see how to do that and it's probably be a "bad" url).
Anyway, am I looking in the right place to stop named links, and is this the best way to do it?
Thanks :)
If you want to disallow external named links
(like [ name | http://wazoo.com/ ]) as well as
internal named links ([ name | WikiWord ]),
replace (in lib/stdlib.php):
preg_match("/([^|]+)(\|)?([^|]+)?/", $match[2], $matches);
with
$matches[1] = $match[2];