1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00
Commit Graph

7043 Commits

Author SHA1 Message Date
Nick Wellnhofer
ccb61f599e html: Remove duplicate calls to htmlAutoClose 2024-10-06 18:13:05 +02:00
Nick Wellnhofer
e1834745e0 html: Add character data tests 2024-10-06 18:13:05 +02:00
Nick Wellnhofer
f9ed30e972 html: HTML5 character data states 2024-10-06 18:13:05 +02:00
Nick Wellnhofer
5951179239 html: Parse named character references according to HTML5 2024-10-06 18:13:05 +02:00
Nick Wellnhofer
d5cd0f07f8 html: Prefer SKIP(1) over NEXT in HTML parser
Use SKIP(1) where it's safe to avoid a function call.
2024-10-06 18:13:05 +02:00
Nick Wellnhofer
dc2d498318 html: Rework htmlLookupSequence
Rename to htmlLookupString and use strstr for increased performance.
2024-10-06 18:13:05 +02:00
Nick Wellnhofer
637215a4de html: Always terminate doctype declarations on '>'
Align with HTML5 spec. This allows to remove the old quote handling in
htmlLookupSequence.
2024-10-06 18:13:05 +02:00
Nick Wellnhofer
72e29f9a3d html: Fix quadratic behavior in push parser
Fix quadratic behavior related to unquoted attribute values. We really
have to replicate parts of the HTML5 state machine to find the end of
tags relibably.

Fixes #533.
2024-10-06 18:13:05 +02:00
Nick Wellnhofer
a80f8b64a9 html: Allow attributes in end tags
Attribute are syntactically allowed in HTML5 end tags but otherwise
ignored.
2024-10-06 18:13:05 +02:00
Nick Wellnhofer
f2272c231b html: Handle unexpected-solidus-in-tag according to HTML5 2024-10-06 18:13:05 +02:00
Nick Wellnhofer
939b53ee12 html: Stop skipping tag content
Tag and attributes names should always be parsed succesfully now.
2024-10-06 18:13:05 +02:00
Nick Wellnhofer
dcb2abb2fe html: Parse tag and attribute names according to HTML5
HTML5 allows bascially all characters in tag and attribute names.
2024-10-06 18:13:05 +02:00
Nick Wellnhofer
d67833a3c5 xmllint: Use proper type to store seconds since epoch
Should avoid year 2038 problem.

Fixes #801.
2024-09-26 19:34:34 +02:00
correctmost
81d38ed069 meson: Fix duplicate listing of libxml2.devhelp2
The duplication caused a warning when uninstalling.
2024-09-25 07:52:10 -04:00
Nick Wellnhofer
b1c5aa6544 xpath: Deprecate xmlXPathNAN and xmlXPath*INF
Users should simply use the C99 macros.
2024-09-19 12:50:59 +02:00
Nick Wellnhofer
55ddccb645 io: Make sure not to pass partial UTF-8 to write callback
We cannot split UTF-8 at arbitrary boundaries.
2024-09-14 00:05:13 +02:00
Nick Wellnhofer
c46b89e243 xpath: Deprecate xmlXPathEvalExpr
Also check the argument instead of crashing if there's no context.
2024-09-13 21:06:36 +02:00
Nick Wellnhofer
03f1bdd260 xpath: Make recursion check work with xmlXPathCompile
The check for maximum recursion depth required a parser context with an
xmlXPathContext which xmlXPathCompile didn't provide.

All other code should already set up or require an xmlXPathContext.
2024-09-13 20:59:47 +02:00
Nick Wellnhofer
dae160c64b encoding: Fix table entry for "UTF16" 2024-09-13 12:08:20 +02:00
Nick Wellnhofer
5e7874015e save: Make xmlEscapeTab signed
Fixes issues in platforms where char is unsigned.

Fixes #797.
2024-09-10 17:50:08 +02:00
Nick Wellnhofer
6e503eb742 encoding: Handle more ICU error codes
U_ILLEGAL_ESCAPE_SEQUENCE and U_UNSUPPORTED_ESCAPE_SEQUENCE can occur
with ISO-2022.
2024-09-10 03:34:46 +02:00
Nick Wellnhofer
55d36c5990 encoding: Fix error code in xmlUconvConvert
Broke in 46ec621e.
2024-09-10 03:11:18 +02:00
Nick Wellnhofer
de10d4cd5f include: Check whether _MSC_VER is defined
Should fix #795.
2024-09-04 16:32:22 +02:00
Nick Wellnhofer
bd9eed4694 parser: Make unsupported encodings an error in declarations
This was changed in 45157261, but in encoding declarations, unsupported
encodings should raise a fatal error.

Fixes #794.
2024-09-02 19:29:39 +02:00
Nick Wellnhofer
40abebbc73 python: Fix SAX driver with character streams
This apparently broke with Python 3.5 which introduced character
streams.

Fixes #790.
2024-08-29 01:31:26 +02:00
Nick Wellnhofer
8ae06d5223 SAX2: Don't merge CDATA sections
The Document Object Model (DOM) Level 3 Core Specification says:

> Adjacent CDATASection nodes are not merged by use of the normalize
> method of the Node interface.

Fixes #412.
2024-08-29 01:31:19 +02:00
Nick Wellnhofer
dde62ae5d5 parser: Align push parsing of CDATA sections with pull parser
Remove special handling of CDATA sections in push parser. This makes
sure that only a single callback is generated for large sections.

Fixes #22 and needed for #412.
2024-08-29 01:28:49 +02:00
Nick Wellnhofer
4d10e53af1 parser: Make sure to set and increment input id
Revert part of commits 410931e3 and b9d2f3c9.
2024-08-28 22:47:20 +02:00
Nick Wellnhofer
6d365ca02c doc: XML_PARSE_NO_XXE is available since 2.13.0 2024-08-28 22:09:30 +02:00
Nick Wellnhofer
8ad618d2d6 doc: Document all xmllint options
Remove --pushsmall.

Fixes #785.
2024-08-28 22:03:30 +02:00
triallax
67ff748c3e
io: don't set the executable bit when creating files
Issue seems to have been introduced in
0bef93bf24.
2024-08-26 23:53:29 +01:00
Nick Wellnhofer
0bb0012e98 catalog: Set xmlCatalogInitialized after setting default catalog 2024-08-19 21:18:32 +02:00
Nick Wellnhofer
8625db2892 xmlcatalog: Improved fix for #699 2024-08-19 21:14:04 +02:00
Nick Wellnhofer
4b0078781b Revert "catalog: Fetch XML catalog before dumping"
This reverts commit 723b4de040.
2024-08-19 21:14:04 +02:00
Nick Wellnhofer
57b92cabd2 catalog: Fix regression in xmlCatalogAdd
Don't load system catalog.
2024-08-19 21:14:04 +02:00
Nick Wellnhofer
2abb903344 tests: Add fallback for glob()
Fix build on platforms without glob().
2024-08-19 18:01:24 +02:00
Nick Wellnhofer
567f612d29 build: Check for declaration of glob() function
Don't rely on presence of glob.h.
2024-08-19 17:57:43 +02:00
Nick Wellnhofer
2191ccdf7b autotools: Fix EXTRA_DIST
Fixes #786.
2024-08-18 12:17:10 +02:00
makise-homura
5c60860905 Eliminate false positive -Warray-bounds on some compilers
This affects GCC 7.3, MinGW 7.3, and LCC 1.25 and 1.26.
In some sense it reverts ad93f087.
2024-08-16 22:35:54 +03:00
makise-homura
a3043b478f threads: define _WIN32_WINNT as 0x0600 to use InitOnceExecuteOnce() 2024-08-16 22:26:07 +03:00
makise-homura
f59da1a364 hash: Suppress GCC 7.3 and MINGW maybe-uninitialized warning 2024-08-16 22:26:07 +03:00
makise-homura
103aadbc66 parser: Suppress EDG maybe-uninitialized warning 2024-08-16 22:26:07 +03:00
Nick Wellnhofer
f2c48847fa io: Add missing calls to xmlInitParser
This is required after c9a46a91.

Should fix #782.
2024-08-13 14:38:59 +02:00
Nick Wellnhofer
0c56eb8215 tree: Restore return value of xmlNodeListGetString with NULL list
When passing a NULL list to xmlNodeListGetString or
xmlNodeListGetRawString, return NULL instead of "" to match the old
behavior.

Fixes #783.
2024-08-12 21:38:50 +02:00
Taylor R Campbell
b45a0f0eca nanohttp: Avoid ctype(3) misuse.
fix https://gitlab.gnome.org/GNOME/libxml2/-/issues/780
2024-08-07 11:12:33 +02:00
Nick Wellnhofer
1d009fe35d parser: Report at least one fatal error 2024-08-05 15:14:21 +02:00
Nick Wellnhofer
bfed6e6ae8 parser: Fix error handling after reaching limit
Mark document as non-wellformed and stop parser even if error limit was
reached.

Regressed in abd74186.
2024-08-05 14:58:37 +02:00
Nick Wellnhofer
6e1e22dc5f malloc-fail: Fix null-deref in xmlPatPushState 2024-08-04 11:47:26 +02:00
Nick Wellnhofer
a530ff125d io: Always consume encoding handler when creating output buffers
Also free encoding handler in error case.

Remove xmlAllocOutputBufferInternal which was identical to
xmlAllocOutputBuffer.
2024-07-29 14:25:39 +02:00
Nick Wellnhofer
36ea881b9d malloc-fail: Fix memory leak in xmlOutputBufferCreateFilename
Close encoding handler on error.
2024-07-26 18:07:27 +02:00