Compare commits

..

No commits in common. "c6f604c28b9fac6f2b74e3f15fadeae933c88f35" and "0b3c66b99b2c2865c83344bb49b3ce1bd7672758" have entirely different histories.

1 changed files with 20 additions and 6 deletions

View File

@ -78,8 +78,7 @@
{
$node = $nodes->item(0);
$nodehtml = get_clean_html($node);
$result .= $nodehtml;
$epub->AddPage($result, false, $title);
$epub->AddPage($nodehtml, false, $title);
}
}
@ -464,6 +463,23 @@
$doc->loadHTML($article);
$finder = new DomXPath($doc);
// strip images
/*$toremove = $finder->query('//svg');
foreach ($toremove as $elt)
{
$elt->parentNode->removeChild($elt);
}
$toremove = $finder->query('//figure');
foreach ($toremove as $elt)
{
$elt->parentNode->removeChild($elt);
}
$toremove = $finder->query('//span[@class="screen-reader-only"]');
foreach ($toremove as $elt)
{
$elt->parentNode->removeChild($elt);
}*/
$result = '<h1>' . $title . '</h1>';
$result .= '<p>' . $author . '</p>';
$result .= '<p>' . $item->pubDate . '</p>';
@ -479,8 +495,7 @@
{
$node = $nodes->item(0);
$nodehtml = get_clean_html($node);
$result .= $nodehtml;
$epub->AddPage($result, false, $title);
$epub->AddPage($nodehtml, false, $title);
}
}
@ -548,8 +563,7 @@
{
$node = $nodes->item(0);
$nodehtml = get_clean_html($node);
$result .= $nodehtml;
$epub->AddPage($result, false, $title);
$epub->AddPage($nodehtml, false, $title);
}
}
}