test/HTML


Log

Author Commit Date CI Message
Nick Wellnhofer e1834745 2024-09-07T00:54:25 html: Add character data tests
Nick Wellnhofer 59511792 2024-09-03T15:52:44 html: Parse named character references according to HTML5
Nick Wellnhofer e3959461 2023-11-30T16:15:46 html: Reenable buggy detection of XML declarations Switch to UTF-8 if a document starts with '<?xm' to match old behavior. Also enable this check in the push parser. Fixes #637.
Nick Wellnhofer d7d0bc65 2023-03-31T16:47:48 SAX2: Ignore namespaces in HTML documents In commit 21ca8829, we started to ignore namespaces in HTML element names but we still called xmlSplitQName, effectively stripping the namespace prefix. This would cause elements like <o:p> being parsed as <p>. Now we leave the name untouched. Fixes #508.
Nick Wellnhofer e986d09c 2022-07-15T14:02:26 Skip incorrectly opened HTML comments Commit 4fd69f3e fixed handling of '<' characters not followed by an ASCII letter. But a '<!' sequence followed by invalid characters should be treated as bogus comment and skipped. Fixes #380.
Mike Dalessio 24cdc890 2021-07-17T14:06:49 test coverage for abruptly-closed comments These establish baseline behavior so that the subsequent commit is clear about the behavior it will modify.
Nick Wellnhofer 2732b234 2022-01-10T13:32:14 Fix regression parsing public IDs literals in HTML Fix regression introduced when reworking htmlParsePubidLiteral in commit 93ce33c2. Fixes #318.
Mike Dalessio e28d9347 2020-08-04T14:53:19 add test coverage for incorrectly-closed comments this establishes the baseline behavior so that subsequent commits which modify this behavior are clear about what's being changed.
Nick Wellnhofer 477c7f6a 2020-06-28T15:54:23 Fix quadratic runtime in HTML parser Commit eeb99329 removed an important optimization avoiding quadratic runtime when repeatedly scanning the input buffer for terminating characters in the HTML push parser. The related bug is https://bugzilla.gnome.org/show_bug.cgi?id=444994 Make sure that ctxt->checkIndex is always written and store additional parser state in ctxt->inSubset which is unused in the HTML parser. Found by OSS-Fuzz.
David Kilzer 85c112a0 2017-06-12T18:26:11 Add test cases for bug 758518 test/HTML/758518-entity.html exposed a bug in pushParseTest() in runtest.c which assumed that an input file was at least 4 bytes long. That test case is only 3 bytes, so we now take the minimum of 4 bytes or the length of the test input. We also now use 'chunkSize' in place of the hard-coded value '1024' later in the function.
Pranjal Jumde 0bcd05c5 2016-03-01T15:18:04 Heap-based buffer overread in htmlCurrentChar For https://bugzilla.gnome.org/show_bug.cgi?id=758606 * parserInternals.c: (xmlNextChar): Add an test to catch other issues on ctxt->input corruption proactively. For non-UTF-8 charsets, xmlNextChar() failed to check for the end of the input buffer and would continuing reading. Fix this by pulling out the check for the end of the input buffer into common code, and return if we reach the end of the input buffer prematurely. * result/HTML/758606.html: Added. * result/HTML/758606.html.err: Added. * result/HTML/758606.html.sax: Added. * result/HTML/758606_2.html: Added. * result/HTML/758606_2.html.err: Added. * result/HTML/758606_2.html.sax: Added. * test/HTML/758606.html: Added test case. * test/HTML/758606_2.html: Added test case.
Pranjal Jumde a820dbea 2016-03-01T11:34:04 Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605> Reviewed by David Kilzer. * HTMLparser.c: (htmlParseName): Add bounds check. (htmlParseNameComplex): Ditto. * result/HTML/758605.html: Added. * result/HTML/758605.html.err: Added. * result/HTML/758605.html.sax: Added. * runtest.c: (pushParseTest): The input for the new test case was so small (4 bytes) that htmlParseChunk() was never called after htmlCreatePushParserCtxt(), thereby creating a false positive test failure. Fixed by using a do-while loop so we always call htmlParseChunk() at least once. * test/HTML/758605.html: Added.
Denis Pauk a0cd075d 2012-05-11T19:31:12 HTML parser error with <noscript> in the <head> For https://bugzilla.gnome.org/show_bug.cgi?id=615785 When the <noscript> is found, <head> is closed and a <body> element is created. The real <body id="xxx"> gets skipped over, so I can't see any of the body's attributes. Just don't close <head> when encountering a <noscript> Add a regression test too
Denis Pauk 868d92da 2012-05-10T15:34:57 Add HTML parser support for HTML5 meta charset encoding declaration For https://bugzilla.gnome.org/show_bug.cgi?id=655218 http://www.w3.org/TR/2011/WD-html5-20110525/semantics.html#the-meta-element """ The charset attribute specifies the character encoding used by the document. This is a character encoding declaration. If the attribute is present in an XML document, its value must be an ASCII case-insensitive match for the string "UTF-8" (and the document is therefore forced to use UTF-8 as its encoding). """ However, while <meta http-equiv="Content-Type" content="text/html; charset=utf8"> works, <meta charset="utf8"> does not. While libxml2 HTML parser is not tuned for HTML5, this is a simple addition Also added a testcase
Daniel Veillard a57ba4ce 2008-09-25T16:06:18 fix an HTML parsing error on large data sections reported by Mike Day add * HTMLparser.c: fix an HTML parsing error on large data sections reported by Mike Day * test/HTML/utf8bug.html result/HTML/utf8bug.html.err result/HTML/utf8bug.html.sax result/HTML/utf8bug.html: add the reproducer to the test suite daniel svn path=/trunk/; revision=3797
Daniel Veillard 48519092 2006-10-17T15:56:35 fixing HTML entities in attributes parsing bug #362552 added to the * HTMLparser.c: fixing HTML entities in attributes parsing bug #362552 * result/HTML/entities2.html* test/HTML/entities2.html: added to the regression suite Daniel
Daniel Veillard b990008f 2005-10-25T12:36:29 script HTML parser error fix, corrects bug #319715 added test from Michael * HTMLparser.c: script HTML parser error fix, corrects bug #319715 * result/HTML/53867* test/HTML/53867.html: added test from Michael Day to the regression suite Daniel
Daniel Veillard 358fef4b 2005-07-13T16:37:38 applied UTF-8 script parsing bug #310229 fix from Jiri Netolicky added the * HTMLparser.c: applied UTF-8 script parsing bug #310229 fix from Jiri Netolicky * result/HTML/script2.html* test/HTML/script2.html: added the test case from the regression suite Daniel
Daniel Veillard 597f1c1f 2005-07-03T23:00:18 applied patch from James Bursa fixing an html parsing bug in push mode * HTMLparser.c: applied patch from James Bursa fixing an html parsing bug in push mode * result/HTML/repeat.html* test/HTML/repeat.html: added the test to the regression suite Daniel
Daniel Veillard fc484dd0 2004-10-22T14:34:23 added support for HTML PIs #156087 added specific tests Daniel * HTMLparser.c: added support for HTML PIs #156087 * test/HTML/python.html result/HTML/python.html*: added specific tests Daniel
Daniel Veillard ce02dbc4 2002-10-22T19:14:58 Mikhail Sogrine pointed out a bug in HTML parsing, applied his patch added * HTMLparser.c: Mikhail Sogrine pointed out a bug in HTML parsing, applied his patch * result/HTML/attrents.html result/HTML/attrents.html.err result/HTML/attrents.html.sax test/HTML/attrents.html: added the test and result case provided by Mikhail Sogrine Daniel
Daniel Veillard 957fdcf2 2001-11-06T22:50:19 handle the case of < in quoted attributes, Bastian Kleineidam Daniel * HTMLparser.c test/HTML/lt.html result/HTML/lt.html*: handle the case of < in quoted attributes, Bastian Kleineidam Daniel
Daniel Veillard f0c5376a 2001-06-07T16:07:07 - HTMLtree.c: when in a pre element no formatting space should be added. - test/HTML/pre.html result/HTML/pre.html*: added a regression test Daniel
Daniel Veillard f69bb4b5 2001-05-19T13:24:56 - HTMLparser.c: Closed bug #54891 - result/HTML/cf_128.html* test/HTML/cf_128.html: added the test to the suite forgot to commit this one yesterday - encoding.h hash.c nanoftp.h parser.h tree.h uri.h xlink.h xpointer.c: applied a documentation patch from LotR and filled in a few missing descriptions Daniel
Daniel Veillard 7eda8452 2000-10-14T23:38:43 - HTMLparser.c HTMLtree.[ch] SAX.c testHTML.c tree.c: fixed HTML support for SCRIPT and STYLE with help from Bjorn Reese - test/HTML/* result/HTML/*: added simple testcase and updated the existing ones. Daniel
Daniel Veillard 87b95395 2000-08-12T21:12:04 Large sync between my W3C base and Gnome's one: - parser.[ch]: added xmlGetFeaturesList() xmlGetFeature() and xmlAddFeature() - tree.[ch]: added xmlAddChildList() - xmllint.c: MAP_FAILED macro test - parser.h: added xmlParseCtxtExternalEntity() - valid.c: applied bug fixes removed warning - tree.c: added CDATA block to elements content - testSAX.c: cleanup of output - testHTML.c: added SAX testing - encoding.c: better error recovery - SAX.c, parser.c: fixed one of the external entity processing of the OASis testsuite - Makefile.am: added HTML SAX regression tests - configure.in: bumped to 2.2.2 - test/HTML/ result/HTML: added a few of HTML tests, and added the SAX results Daniel
Daniel Veillard 71f93fca 2000-07-14T14:54:24 Added a bunch of testsuite realted files missing, Daniel.
Daniel Veillard 5cb5ab8d 1999-12-21T15:35:29 - release 1.8.2 - HTML handling improvement - new tree handling functions - release 1.8.2 - HTML handling improvement - new tree handling functions - default namespace on attribute bug fixed - libxml use for C++ fixed (for good this time !) Daniel
Daniel Veillard 3500838f 1999-10-25T13:15:52 BUG FIXED #2784 HTML parsing/output improvements Rebuilt, updated the docs BUG FIXED #2784 HTML parsing/output improvements Rebuilt, updated the docs Improvement of regression scripts, make testall should look clean Released as 1.7.4
Daniel Veillard 7c1206fc 1999-10-14T09:10:25 Revamped HTML parsing, lots of bug fixes for HTML stuff, Added xmlValidGetValidElements and xmlValidGetPotentialChildren, Completed and cleaned up the tests, Added doc for new modules gnome-xml-xmlmemory.html and gnome-xml-nanohttp.html, Daniel
Daniel Veillard b05deb7f 1999-08-10T19:04:08 Huge commit: 1.5.0, XML validation, Xpath, bugfixes, examples .... Daniel
Daniel Veillard 82150d8a 1999-07-07T07:32:15 HTML parsing, output is now correct, added HTMLtests target and testcases, Daniel