3
1
Back

'/./' or '/foo/../' with '/' */ for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL */ $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } function mangle_article($article) { // Awkward Zombie // Awkward Zombie $orig_content = strip_tags($article['content']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']/img", $article); } // Invisible Bread (make the bread visible if (preg_match("@.*(get_img_tags($xpath, "//div[@id='comic']//img", $article); } Clean up code formatting; added a few comics.

New Pull Request