From: Arno H. <aho...@in...> - 2000-10-11 08:21:59
|
> > Well, this might not count for much, but the http: solution does not work > > in Emacs' w3 mode. This makes me nervous that it will break other I tried: Netscape, lynx, Konqueror (KDE's browser), Mozilla. They all are able to use http: -- looks to me that Emcas got it wrong. > or maybe even > wiki:diff=SomePage > which can apply more generally than just diff. > I like this last one the most. This looks like a clean solution. Your patch has some subtle bugs though. > --- /home/src/phpwiki/lib/stdlib.php Mon Oct 9 04:33:26 2000 > +++ lib/stdlib.php Wed Oct 11 09:35:43 2000 > - $diffurl = "$ScriptUrl?diff=" . rawurlencode($pagename); > + $diffurl = "wiki:diff=" . rawurlencode($pagename); > $newpage[$k++] = "\t* [$pagename] ([diff|$diffurl]) ..... The pagename must not be rawurlencoded now. We want the real(tm) pagename within the wikipage. Encoding should be done when creating the link. Otherwise people would have to rawurlencode by hand if they would like to add such a link to a wikipage. About names for the link-type: you name both 'meta-wiki' which is not consistent with the naming scheme. I suggest: 'wiki-meta' and 'wiki-meta-named'. Also, doing > + if (preg_match("#wiki:(.*)#", $URL, $umatch)) { > + $link['type'] = 'meta-wiki'; > + $link['link'] = "<a > href=\"$ScriptUrl?".$umatch[1]."\">$linkname</a>"; + } elseif seems too simplistic. Assuming that the link has to be encoded here, you must ensure that there's always a sub-type (diff=, edit=, search=) so that encoding works. This means that another type has to be introduced: 'page=' Those types should be checked for. Everything following the subtype can then be safely urlencoded. /Arno |