3
1
Back

48c37ce59a drugs & wires, pilotside From bab77fac9dc44b0a10d743c564c65ae0938027f6 Mon Sep 17 00:00:00 2001 Subject: [PATCH] Gunnerkrigg and cleanup of alt-tag-only sites Clean up code formatting; added a few comics; standardized appending alt/title text //also get the blog $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $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']); $entry->setAttribute('src', $new_src); $result_html .= "
Alt: " . $img->getAttribute('title') . ""; } //noop } // Something Positive elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { $xpath = new DOMDocument(); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); } elseif (strpos($title_text, $alt_text) !== false){ $text_element = $doc->createElement("i", $alt_text); $title_element.

New Pull Request