mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-22 06:38:08 +00:00
added commentsand fixed something forgotten
This commit is contained in:
parent
d31766300a
commit
f0a819a968
2 changed files with 9 additions and 1 deletions
|
@ -733,7 +733,7 @@ class Poche
|
||||||
$data = array();
|
$data = array();
|
||||||
$read = 0;
|
$read = 0;
|
||||||
|
|
||||||
if (Tools:: get_doctype($html)) {
|
if (Tools::get_doctype($html)->innertext == "<!DOCTYPE NETSCAPE-Bookmark-file-1>") {
|
||||||
// Firefox-bookmarks HTML
|
// Firefox-bookmarks HTML
|
||||||
foreach (array('DL','ul') as $list) {
|
foreach (array('DL','ul') as $list) {
|
||||||
foreach ($html->find($list) as $ul) {
|
foreach ($html->find($list) as $ul) {
|
||||||
|
|
|
@ -420,6 +420,14 @@ final class Tools
|
||||||
return str_replace('+', '', $token);
|
return str_replace('+', '', $token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Returns the doctype for an HTML document (used for Mozilla Bookmarks)
|
||||||
|
* @param simple_html_dom $doc
|
||||||
|
* @return doctype $el
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
function get_doctype($doc)
|
function get_doctype($doc)
|
||||||
{
|
{
|
||||||
$els = $doc->find('unknown');
|
$els = $doc->find('unknown');
|
||||||
|
|
Loading…
Reference in a new issue