From 42c80841c846610be280218d53fcde06b0f0063b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 6 Dec 2013 09:45:27 +0100 Subject: [change] we now use Full-Text RSS 3.1, thank you so much @fivefilters --- inc/3rdparty/libraries/html5/Parser.php | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 inc/3rdparty/libraries/html5/Parser.php (limited to 'inc/3rdparty/libraries/html5/Parser.php') diff --git a/inc/3rdparty/libraries/html5/Parser.php b/inc/3rdparty/libraries/html5/Parser.php new file mode 100644 index 00000000..5f9ca560 --- /dev/null +++ b/inc/3rdparty/libraries/html5/Parser.php @@ -0,0 +1,36 @@ +parse(); + return $tokenizer->save(); + } + /** + * Parses an HTML fragment. + * @param $text HTML text to parse + * @param $context String name of context element to pretend parsing is in. + * @param $builder Custom builder implementation + * @return Parsed HTML as DOMDocument + */ + static public function parseFragment($text, $context = null, $builder = null) { + $tokenizer = new HTML5_Tokenizer($text, $builder); + $tokenizer->parseFragment($context); + return $tokenizer->save(); + } +} -- cgit v1.2.3