3
1
Back

= $doc->saveHTML(); function get_img_tags($xpath, $query, $article, $base_url=NULL) { $img_attributes_whitelist = array('src', 'alt', 'title'); if (!$base_url){ $base_url = $article['link']; From 122134fc8e1c73b6bb86552323cca038dd4b5107 Mon Sep 17 00:00:00 2001 Subject: [PATCH] Update readme Add main pdf a924f97182 Minor layout tweaks Based on https://github.com/oguzbilgic/fpd, which has broken alt tags if both exist elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { // only keep everything starting at the first if (preg_match("@.*()@", $article['content'], $matches)) { $img = $matches[1]; $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//div[@class='timeline-description']", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for.

New Pull Request