joel schaubert schrieb:
> This is a patchfile created against phpwiki-1.3.12_rc1.
> It allows the wiki to recognize the format of relative links.
> I use this because I want to have some writeups in html, shtml, .txt, or
> other that have on my web server that I want to link to from phpwiki as
> relative links.
>
> This way when I copy my wiki to another machine, the links still work.
>
> So the patch allows the wiki to recognize ../ and / as
> relative links.
> This is the same patch that I had posted and had accepted for wiki 1.2.x
> but now I'm upgrading to 1.3x and have duplicated it for 1.3.12_rc1.
>
> Please consider for inclusion into wiki 1.3x
I'm not sure if this is a security risc. I'll consider
/* Relatives links by Joel Schaubert.
* Recognize [../bla] or [/bla] as relative links, without
* needing http://
*/
if (preg_match('/^(\.\.\/|\/)/', $link)) {
return new Cached_ExternalLink($link, $label);
}
--
Reini Urban
http://phpwiki.org/
http://helsinki.at/ http://spacemovie.mur.at/
|