3
1
Back

$abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL is ready! */ return $scheme.'://'.$abs; } function init($host) { // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { $article['content'] .= "
" . $msg . ""; } if (ADD_IDS) { $imgs = $xpath->query('//img'); //doesn't get simpler than this.

New Pull Request