diff options
Diffstat (limited to 'inc/poche/Tools.class.php')
-rwxr-xr-x | inc/poche/Tools.class.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index c8fb2e52..f3d1013f 100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php | |||
@@ -420,4 +420,23 @@ final class Tools | |||
420 | return str_replace('+', '', $token); | 420 | return str_replace('+', '', $token); |
421 | } | 421 | } |
422 | 422 | ||
423 | /** | ||
424 | * | ||
425 | * Returns the doctype for an HTML document (used for Mozilla Bookmarks) | ||
426 | * @param simple_html_dom $doc | ||
427 | * @return doctype $el | ||
428 | * | ||
429 | */ | ||
430 | |||
431 | public static function get_doctype($doc) | ||
432 | { | ||
433 | $els = $doc->find('unknown'); | ||
434 | |||
435 | foreach ($els as $e => $el) | ||
436 | if ($el->parent()->tag == 'root') | ||
437 | return $el; | ||
438 | |||
439 | return NULL; | ||
440 | } | ||
441 | |||
423 | } | 442 | } |