3
1
Back

$re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL is ready! */ return $scheme.'://'.$abs; } function hook_render_article($article) { return $base.$rel; if ($rel[0] == '#' || $rel[0] == '?') { return $this->mangle_article($article); } function api_version() { return 2; } /* absolute URL */ $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' .

New Pull Request