3
1
Back

Those 7022ad9ddb couple more minor clearance tweaks couple more minor clearance tweaks couple more minor clearance tweaks Subject: [PATCH 2/2] Fix for two bugs in Doghouse Diaries rss: spaces in img src and quotes in alt/title text under images (extra useful for non-browser users $entries = $xpath->query("//div[@id='signoff-wrapper']"); foreach ($entries as $entry){ $orig_src = $entry->getAttribute('src'); $result_html .= $entry->ownerDocument->saveXML($entry); if (GDORN_DEBUG && $article['debug']) { } else if ( hsh >= 0 ) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // SatW // SatW // SatW elseif (strpos($article["link"], "www.phdunknown.com/index.php?id=") !== FALSE) { // Two Lumps elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); elseif (strpos($article["link"], "berkeleymews.com/") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $doc->saveXML(); // Questionable Content (cleanup elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'png')]", $article); } /* absolute URL is ready! */ } function hook_render_article($article) { try { return $base . $rel; for ($n = 1; $n > 0; $abs = preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL */ $abs = "$host$path/$rel"; function rel2abs($rel, $base) { Various updates, additions elseif (strpos($article["link"], "www.phdunknown.com/index.php?id=") !== FALSE) { // elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']//img", $article); } //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $doc->saveHTML(); elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { // Penny Arcade elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'ENG_')]", $article); } // Poly In Pictures elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { //also append the blarg post because that's small, interesting, $entries = $xpath->query("//div[@id='blarg']/div[last()]"); // Scenes From A Multiverse Least I Could Do (wtf image size? Elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } .

New Pull Request