Commit graph

23 commits

Author SHA1 Message Date
Jim Derry 91f29ea7b8 HTML Tidy now parses HTML non-recursively.
Instead of recursive calls for each nested level of HTML, the next level is
pushed to a stack on the heap, and returned to the main loop. This prevents
stack overflow at _n_ depth (where _n_ is operating-system dependent). It's
probably still possible to use all of the heap memory, but Tidy's allocators
already fail gracefully in this circumstance.

Please report any regressions of your own HTML!

NOTE: the XML parser is not affected, and is probably still highly recursive.
2021-08-14 20:42:43 -04:00
Jim Derry e56716f154 Improve internal documentation.
Start general conversion to eliminate and/or reduce recursion.
2021-07-28 19:46:54 -04:00
Jim Derry 1bb72d6041 Spelling fixes, thanks to @jschleus. 2021-07-21 15:50:53 -04:00
Jim Derry f95540b5c9 Fixed merge conflict; fixed non-build issue on macOS. RC for testing. 2021-07-10 11:13:58 -04:00
Caleb Callaway 91ae1274ac
Add SVG paint attributes (#907)
Fixes #903
2020-11-22 18:02:00 +01:00
Antonios Hadjigeorgalis 5d4e46b333 Issue#649: added <data> tag
<time> tag used as model for adding <data> tag
2018-11-06 20:54:36 -05:00
Jim Derry f5bdedecaf Cleanup
- Added doxygen documentation to `tags.h`
- Consistency to `tags.c` header.
- Moved TY_(DeclareUserTag) to tags.c/.h for consistency with the other list
  parsing declaratory functions.
- Merged user tags parsing into the general list, eliminating a lot of redundant
  code.
2017-10-29 14:58:02 -04:00
Jim Derry ff030aab7a ELEMENT_HASH_LOOKUP is no longer conditional, and is a permanent part of Tidy. 2017-10-03 14:04:32 -04:00
Jim Derry 238b8f0a66 Wipe out dead code. We use git for a reason, so it's never really deleted. 2017-10-03 13:56:31 -04:00
Jim Derry 0c5550b06f I think the messages are where I want them to be. Will generate test cases
for comparison. Also regen'd all pots and language headers.
2017-03-15 17:36:05 -04:00
Jim Derry 5606f32f13 WIP; messaging much more logical, except @todo noted. 2017-03-14 21:50:10 -04:00
Jim Derry ed5a1d84ea Add TY_(nodeIsAutonomousCustomTag), so we can use it elsewhere. 2017-03-14 15:44:46 -04:00
Raphael Ackermann b704a4d0d4 allow zero LI in UL when html5. fix for #396 2016-04-08 23:08:56 +02:00
Geoff McLane d75c82275d Issue #285 - Add a ResetTags func to erset html5 mode before each document 2015-10-14 16:55:35 +02:00
Geoff McLane 0dc68d6cb1 Issue #167 & #169 - default to HTML5 mode.
Revert TidyTag_A to HTML5 mode, but allow the table to be modified if the
DOCTYPE given is found to NOT be HTML5, through a service TY_(AdjustTags).
Care is taken to clear any previous hash cached tags.

At present this only effects the anchor tag, but could be applied to
others that need to change their parsing due to an identified DOCTYPE.
2015-03-06 12:55:24 +01:00
Geoff McLane 70d7e58d8d Add macro nodeIsMAIN(n) 2015-02-22 20:53:14 +01:00
Geoff McLane 0aa81eb256 Issue #130 - MathML attr and entity fix!
This is a set of kludgy fixes for MathML attribute and entities support.

It is intended that a full HTML5 entity table be added at some time, but
at present ALL entities are accepted as written when within the math
element.

Likewise all attributes are accepted on MathML elements without any check
of their name or value, even if they match attributes outside MathML.

And in the pprinter such entities are written as is from the lexer, using
a new PPrintMathML service added, using the new mode OtherNameSpace.

It is hoped all these fixes will NOT effect tidy outside the math element.

ALL fixes in the set a clearly marked '#130 - MathML attr and entity fix!'
for easy searching, and improving if possible.
2015-02-22 18:58:55 +01:00
Geoff McLane 885c7caab7 Issue #70 - Initial implmentation of SVG support.
An immense thanks to Ger Hobbelt who had already done this
in his github.com/GerHobbelt/htmltidy fork.

The two sources have diverges so was not a simple cut
an paste. But again thanks Ger for this.
2015-02-02 17:36:27 +01:00
Geoff McLane ec4d4cd1f1 Issue #92 - OLD problem of ins and del
These are marked as CM_INLINE, but also CM_BLOCK,
so should not be stacked for insertion
2015-01-28 11:50:06 +01:00
Geoff McLane 786b6a99a9 raft of changes to CheckHTML5, and clean 2014-08-08 17:14:28 +02:00
Geoff McLane 78c0080eb8 main code updates to do HTML5 2014-08-03 20:33:29 +02:00
Geoff McLane 39b860b1a7 Continue to remove CVS Info from source 2014-08-03 18:46:37 +02:00
Michael[tm] Smith b92d7aab88 new 2011-11-17 11:44:16 +09:00