aboutsummaryrefslogtreecommitdiffstats
path: root/result/HTML
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade libxml2 to 1a360c1c2ec950f478d55b31722ecf78f5698e97Haibo Huang2020-07-3115-55/+113
| | | | | | | | | | | Also change upstream to github. This change moves away from stable release. Because we need CMakeLists.txt. It is not in any release yet. They are likely to release another stable version within this year. We can upgrade to that version when it is available. Bug: 157157503 Change-Id: If6f245dbabe36a114563d209c8e100b7e3083f20
* Initialize keepBlanks in HTML parserNick Wellnhofer2017-06-1228-136/+136
| | | | | This caused failures in the HTML push tests but the fix required to change the expected output of the HTML SAX tests.
* Add test cases for bug 758518David Kilzer2017-06-126-0/+32
| | | | | | | | 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.
* Heap-based buffer overread in htmlCurrentCharPranjal Jumde2016-05-236-0/+63
| | | | | | | | | | | | | | | | | | | | | 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.
* Detect change of encoding when parsing HTML namesHugh Davenport2016-05-233-3/+4
| | | | | | | | | | | From https://bugzilla.gnome.org/show_bug.cgi?id=758518 Happens when a file has a name getting parsed, but no valid encoding set, so libxml has to guess what the encoding is. This patch detects when the buffer location changes, and if it does, restarts the parsing of the name. This slightly change a couple of regression tests output
* Bug 758605: Heap-based buffer overread in xmlDictAddString ↵Pranjal Jumde2016-05-233-0/+19
| | | | | | | | | | | | | | | | | | | | <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.
* Keep non-significant blanks node in HTML parserDaniel Veillard2012-09-0727-327/+740
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=681822 Regardless if the option HTML_PARSE_NOBLANKS is set or not, blank nodes are removed from a HTML document, for example: <html> <head> <title>This is a test.</title> </head> <body> <p>This is a test.</p> </body> </html> is read as: <html><head><title>This is a test.</title></head><body> <p>This is a test.</p> </body></html> This changes the default behaviour but the old behaviour is available as expected when using the parser flag HTML_PARSE_NOBLANKS Based on original patch from Igor Ignatyuk <igor_ignatiouk@hotmail.com> * HTMLparser.c: change various places in the parser where ignorable_space SAX callback was called without checking for the parser flag preference * xmllint.c: make sure we use the new flag even for HTML parsing * result/HTML/*: this modifies the output of a number of tests
* HTML parser error with <noscript> in the <head>Denis Pauk2012-05-113-0/+48
| | | | | | | | | 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
* Add HTML parser support for HTML5 meta charset encoding declarationDenis Pauk2012-05-103-0/+37
| | | | | | | | | | | | | | | | | | | | | | 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
* Don't give default HTML boolean attribute values in parserDaniel Veillard2010-03-153-7/+7
| | | | | | | | | * HTMLparser.c: don't default value of HTML boolean attributes in the parser * SAX2.c: move this to SAX2 tree building backend * result/HTML/doc2.htm.sax result/HTML/doc3.htm.sax result/HTML/wired.html.sax: this changes a few HTML SAX regression tests
* fix an HTML parsing error on large data sections reported by Mike Day addDaniel Veillard2008-09-253-0/+935
| | | | | | | | | | | * 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
* change the way script/style are parsed to not try to detect comments,Daniel Veillard2007-04-163-57/+28
| | | | | | | | | * HTMLparser.c: change the way script/style are parsed to not try to detect comments, reported by Mike Day * result/HTML/doc3.*: affects the result of that test Daniel svn path=/trunk/; revision=3598
* fixing HTML minimized attribute values to be generated internally if notDaniel Veillard2006-10-173-7/+7
| | | | | | | | | * HTMLparser.c: fixing HTML minimized attribute values to be generated internally if not present, fixes bug #332124 * result/HTML/doc2.htm.sax result/HTML/doc3.htm.sax result/HTML/wired.html.sax: this affects the SAX event strem for a few test cases Daniel
* fixing HTML entities in attributes parsing bug #362552 added to theDaniel Veillard2006-10-173-0/+29
| | | | | | | * HTMLparser.c: fixing HTML entities in attributes parsing bug #362552 * result/HTML/entities2.html* test/HTML/entities2.html: added to the regression suite Daniel
* script HTML parser error fix, corrects bug #319715 added test from MichaelDaniel Veillard2005-10-253-0/+92
| | | | | | | * 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
* Applied the last patch from Gary Coady for #304637 changing the behaviourDaniel Veillard2005-09-0131-82/+94
| | | | | | | * HTMLparser.c: Applied the last patch from Gary Coady for #304637 changing the behaviour when text nodes are found in body * result/HTML/*: this changes the output of some tests Daniel
* fixed bug #310333 with a patch close to the provided patch for HTML UTF-8Daniel Veillard2005-08-081-2/+2
| | | | | | | * HTMLtree.c: fixed bug #310333 with a patch close to the provided patch for HTML UTF-8 serialization * result/HTML/script2.html: this changed the output of that test Daniel
* applied UTF-8 script parsing bug #310229 fix from Jiri Netolicky added theDaniel Veillard2005-07-133-0/+64
| | | | | | | | * 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
* applied patch from James Bursa fixing an html parsing bug in push modeDaniel Veillard2005-07-033-0/+19
| | | | | | | | * 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
* added support for HTML PIs #156087 added specific tests DanielDaniel Veillard2004-10-223-0/+34
| | | | | | * HTMLparser.c: added support for HTML PIs #156087 * test/HTML/python.html result/HTML/python.html*: added specific tests Daniel
* fix to the fix for #141864 from Paul Elseth apply fix from David GatwoodDaniel Veillard2004-05-111-3/+6
| | | | | | | * xmlIO.c: fix to the fix for #141864 from Paul Elseth * HTMLparser.c result/HTML/doc3.htm: apply fix from David Gatwood for #141195 about text between comments. Daniel
* change --html to make sure we use the HTML serialization rule by defaultDaniel Veillard2003-11-043-44/+21
| | | | | | | | | | * xmllint.c: change --html to make sure we use the HTML serialization rule by default when HTML parser is used, add --xmlout to allow to force the XML serializer on HTML. * HTMLtree.c: ugly tweak to fix the output on <p> element and solve #125093 * result/HTML/*: this changes the output of some tests Daniel
* Fix #124907 by simply backporting the same fix as for the XML parserDaniel Veillard2003-10-281-1/+0
| | | | | | | | * HTMLparser.c: Fix #124907 by simply backporting the same fix as for the XML parser * result/HTML/doc3.htm.err: change to ID detecting modified one test result. Daniel
* fixed to not send NULL to %s printing cleaning up some of the regressionDaniel Veillard2003-10-193-16/+16
| | | | | | | | | * HTMLparser.c: fixed to not send NULL to %s printing * python/tests/error.py result/HTML/doc3.htm.err result/HTML/test3.html.err result/HTML/wired.html.err result/valid/t8.xml.err result/valid/t8a.xml.err: cleaning up some of the regression tests error Daniel
* more code cleanup, especially around error messages, the HTML parser hasDaniel Veillard2003-10-057-117/+118
| | | | | | | | | * HTMLparser.c Makefile.am legacy.c parser.c parserInternals.c include/libxml/xmlerror.h: more code cleanup, especially around error messages, the HTML parser has now been upgraded to the new handling. * result/HTML/*: a few changes in the resulting error messages Daniel
* removing the SAXresults tree, keeping result in the same tree, addedDaniel Veillard2003-09-0317-19/+19
| | | | | | | * Makefile.am results/*.sax SAXResult/*: removing the SAXresults tree, keeping result in the same tree, added SAXtests to the default "make tests" Daniel
* fixed a small problem in the patch for #118763 this reverts back to theDaniel Veillard2003-08-041-1/+1
| | | | | | * tree.c: fixed a small problem in the patch for #118763 * result/HTML/doc3.htm*: this reverts back to the previous result Daniel
* fixing HTML attribute serialization bug #118763 applying a modifiedDaniel Veillard2003-08-041-1/+1
| | | | | | | * tree.c: fixing HTML attribute serialization bug #118763 applying a modified version of the patch from Bacek * result/HTML/doc3.htm*: this modifies the output from one test Daniel
* do not generate &quot; for " outside of attributes this changes the outputDaniel Veillard2003-06-132-7/+7
| | | | | | * entities.c: do not generate &quot; for " outside of attributes * result//*: this changes the output of some tests Daniel
* Updated testfiles for error.c fixWilliam M. Brack2003-05-145-173/+173
|
* fixed some problems related to #75813 about handling of Result Value TreesDaniel Veillard2003-03-243-44/+44
| | | | | | * xpath.c: fixed some problems related to #75813 about handling of Result Value Trees Daniel
* patch from johan@evenhuis.nl for #107937 fixing some line countingDaniel Veillard2003-03-223-38/+38
| | | | | | | | * HTMLparser.c parser.c parserInternals.c: patch from johan@evenhuis.nl for #107937 fixing some line counting problems, and some other cleanups. * result/HTML/: this result in some line number changes Daniel
* final touch at closing #87235 </p> end tags need to be generated. thisDaniel Veillard2002-11-223-5/+5
| | | | | | | | | * HTMLparser.c: final touch at closing #87235 </p> end tags need to be generated. * result/HTML/cf_128.html result/HTML/test2.html result/HTML/test3.html: this change slightly the output of a few tests * doc/*: regenerated Daniel
* Mikhail Sogrine pointed out a bug in HTML parsing, applied his patch addedDaniel Veillard2002-10-223-0/+25
| | | | | | | | | * 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
* trying to fix 87235 about discarded white spaces in the HTML parser. thisDaniel Veillard2002-07-057-202/+467
| | | | | | | | * HTMLparser.c: trying to fix 87235 about discarded white spaces in the HTML parser. * result/HTML/*: this changes the output of a number of HTML regression tests Daniel
* fixed & serialization bug introduced in 2.4.20 this changes a few thingsDaniel Veillard2002-04-182-8/+8
| | | | | | * HTMLtree.c: fixed & serialization bug introduced in 2.4.20 * result/HTML/*: this changes a few things in the results Daniel
* fixing bug #78662 i.e. add proper escaping of URI when saving HTML files.Daniel Veillard2002-04-142-51/+49
| | | | | | | * HTMLtree.c uri.c: fixing bug #78662 i.e. add proper escaping of URI when saving HTML files. * result/HTML/*: this impacted some tests Daniel
* fix comment in scripts element parsing. updated the results. DanielDaniel Veillard2001-11-103-28/+57
| | | | | | * HTMLparser.c: fix comment in scripts element parsing. * result/HTML/doc3*: updated the results. Daniel
* handle the case of < in quoted attributes, Bastian Kleineidam DanielDaniel Veillard2001-11-063-0/+21
| | | | | | * HTMLparser.c test/HTML/lt.html result/HTML/lt.html*: handle the case of < in quoted attributes, Bastian Kleineidam Daniel
* do not output hexadecimal charrefs when serializing HTML since someDaniel Veillard2001-09-141-9/+9
| | | | | | | | | * encoding.c entities.c: do not output hexadecimal charrefs when serializing HTML since some version of Netscape can't grok it, generate decimal ones. * result/HTML/doc3.htm: output changed due to previous test * parserInternals.c: repair xmlKeepBlanksDefault() broken in 2.4.4 Daniel
* - HTMLparser.[ch] HTMLtree.c: stored the inline/block propertyDaniel Veillard2001-06-137-1083/+202
| | | | | | | | | | of element and use it to avoid outputting formatting spaces at the wrong place. Implemented the format parameter for HTML save. - result/HTML/doc2.htm result/HTML/doc3.htm result/HTML/fp40.htm result/HTML/script.html result/HTML/test2.html result/HTML/test3.html result/HTML/wired.html: of course this impact the result of a number of HTML tests Daniel
* - HTMLtree.c: when in a pre element no formatting space shouldDaniel Veillard2001-06-073-0/+25
| | | | | | be added. - test/HTML/pre.html result/HTML/pre.html*: added a regression test Daniel
* - HTMLparser.c: Closed bug #54891Daniel Veillard2001-05-193-0/+82
| | | | | | | | | | - 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
* - HTMLparser.c: Patch from Jonas BorgströmDaniel Veillard2001-05-116-99/+59
| | | | | | | | | (htmlGetEndPriority): New function, returns the priority of a certain element. (htmlAutoCloseOnClose): Only close inline elements if they all have lower or equal priority. - result/HTML: this of course changed a number of tests results. Daniel
* - HTMLparser.c: trying to fix the problem reported by Jonas BorgströmDaniel Veillard2001-05-034-23/+7
| | | | | | | - results/HTML/ : a few changes in the output of the HTML tests as a result. - configure.in: tying to fix -liconv where needed Daniel
* - HTMLparser.c : HTML parsing still sucks ... trying to dealDaniel Veillard2001-04-249-217/+163
| | | | | | | with madness - result/HTML/ : this modified the result of the regression tests a lot. Daniel
* parsing real HTML is a nightmare.Daniel Veillard2001-04-1212-275/+341
| | | | | | - HTMLparser.c result/HTML/*: revamped the way the HTML parser handles end of tags or end of input Daniel
* Couple of fixes, getting ready for 2.3.1:Daniel Veillard2001-02-152-12/+12
| | | | | | | | | - configure.in: applied patch from Daniel van Balen for OpenBSD and bumped version to 2.3.1 - HTMLtree.c result/HTML/doc3.htm result/HTML/wired.html: the attempt to find autoclosing was simply broken, removed it, updated the examples, this is better Daniel
* testing and bug fixing related to XSLT:Daniel Veillard2001-02-133-2/+10
| | | | | | | | | | - xpath.c result/XPath/tests/chaptersprefol: bugfixes on order and on predicate - HTMLparser.[ch] HTMLtree.c result/HTML/doc3.htm.err result/HTML/doc3.htm.sax result/HTML/wired.html: sometimes one really want to have tags closed on output even if we accept unclosed ones on input Daniel
* General fixes, XPointer improvements:Daniel Veillard2000-11-242-4/+2
| | | | | | | | | | - HTMLparser.c: some fixes on auto-open of html/head/body - encoding.c: fixed a compilation error on some gcc env - xpath.c xpointer.[ch] xpathInternals.h: improved the XPointer implementation - test/XPath/xptr/strpoint test/XPath/xptr/strrange3: added related XPointer tests and associated results Daniel