[dokuwiki] Re: handling of certain schemes within external link
- From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Thu, 28 Jul 2005 14:12:07 +0200
ytrewq1 writes:
On Mac OS X 10.4 there is a scheme named 'x-man-page'.
With the 2005-07-13 version of DokuWiki, these don't show
up appropriately in external links.
hmm.. can someone have a look at the apropriate RFC? Is this a valid
URL-scheme?
The interwiki shortcut 'man' would maybe be the better way anyway (if
someone accesses the wiki without OS-X. Eg:
[[man>vi]] for the manpage of vi
I tried changing line 413 of my inc/parser/handler.php as
follows:
}elseif ( preg_match('#^([a-z0-9-]+?)://#i',$link[0]) ) {
I think the - should be escaped, just to be sure:
}elseif ( preg_match('#^([a-z0-9\-]+?)://#i',$link[0]) ) {
(just added a '-' to the regular expression) and now the
'x-man-page' links appear to show up ok. Is this an
appropriate way to handle this issue? Also, in general if
there are custom schemes that don't appear to be handled
by DokuWiki, is modifying this regular expression an
appropriate way to cope (and sufficient)?
Yes - how else? And submitting a bugreport or ask at the list, as you did,
is a good idea as well :-)
Andi
- Follow-Ups:
- References:
Other related posts:
- » [dokuwiki] handling of certain schemes within external link
- » [dokuwiki] Re: handling of certain schemes within external link
- » [dokuwiki] Re: handling of certain schemes within external link
- » [dokuwiki] Re: handling of certain schemes within external link
I tried changing line 413 of my inc/parser/handler.php as follows:
}elseif ( preg_match('#^([a-z0-9-]+?)://#i',$link[0]) ) {
I think the - should be escaped, just to be sure:
there are custom schemes that don't appear to be handled
by DokuWiki, is modifying this regular expression an
appropriate way to cope (and sufficient)?