3
1
Back

{ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } else if (two_holes_type == "center") { } if ($rel[0]=='#' || $rel[0]=='?') { return 2; } } // Invisible Bread (make the bread visible) $article['content'] = $this->get_img_tags($xpath, "//img[contains(@src, 'sp') and contains(@src, 'png')]", $article); } // Two Lumps elseif (strpos($article['link'], 'jesusandmo.net') !== FALSE) { if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users $entries = $xpath->query("//div[@id='blarg']/div[last()]"); // Scenes From A Multiverse (to get alt tags elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { //no-op function rel2abs($rel, $base) { if ($rel[0]=='#' || $rel[0]=='?') { return $this->mangle_article($article); } function get_img_tags($xpath, $query, &$article, $base_url=NULL) { $img_attributes_whitelist = array('src', 'alt', 'title'); $new_src = $this->rel2abs($orig_src, $article['link']); if ($alt_text && $alt_text != $article['title']){ $result_html .= $entry->ownerDocument->saveXML($entry); if (GDORN_DEBUG && $article['debug']) { } //Sites that provide images and just need alt tags in feedburner (if there are quotes elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { $article['content'] .= "
$orig_content
"; // Awkward Zombie elseif (strpos($article['link.

New Pull Request