Commit graph

51 commits

Author SHA1 Message Date
Jim Derry b342232378 Fixed logical issue with new iterators. 2017-11-19 11:02:13 -05:00
Jim Derry 8ddc0105f9 Add missing iterators for recently added options mute and priority attributes. 2017-11-19 10:21:46 -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 5e66816380 Spacing consistency. 2017-10-08 10:25:09 -04:00
Jim Derry 5ff6aa8a8b Not sure how this got missed... 2017-10-03 14:46:29 -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 0e3cb7c78e Merge branch 'issue_598' into next 2017-10-02 13:34:59 -04:00
Jim Derry 2852ad4c63 Fix #588 and #591
- Apply @geoffmcl's patches and tested.
2017-09-29 15:42:03 -04:00
Jim Derry 397fd1ace0 Address #598
- Add the download attribute to the anchor tag.
2017-09-29 15:30:43 -04:00
Jim Derry 70681131d6 New config option now drives the list; memory deallocated. 2017-09-23 07:20:31 -04:00
Jim Derry 23c28e5b82 Initial commit of #434; WIP 2017-09-22 22:14:59 -04:00
Jim Derry 9b2cd06711 Merge branch 'next' into issue-365 2017-05-13 22:27:14 -04:00
Jim Derry 0f1e625324 Address #378
Addresses issue #378 by NOT emitting warnings if `fix-uri` is `no`, for HTML5
documents. This preserves existing behavior for legacy document types.
2017-05-13 20:46:48 -04:00
Jim Derry 982504eee0 Case insensitive compare is safe here, and prevents erroneous propriertary attribute errors. 2017-05-12 08:28:11 -04:00
Geoff McLane 77420b94d0 Fix for 'isalnum' in Windows
According to the MSN documentation 'isalnum(c)' is only valid when c equals
EOF, or is in the range 0 to 255 inclusive. It states the behavior is
undefined outside this range, and in Debug mode triggers an assert dialog.
2017-05-08 18:42:33 +02:00
Jim Derry fd77312175 Attempt to address issue #352. This patch correctly address the specific issues
in #352, but I'm worried that there's some over-reach here.

Currently only implemented as a warning, with no switch to turn it off, which
maintains current behavior other than the warning.

In general, we're treating any string as a complete URL, rather than breaking
URL's into component parts. Thus the `IsURLCodePoint()` check includes a few
other generic characters that strictly speaking aren't valid codepoints, but
are valid as escape characters and delimiters.

When addressing #338, I ran into a similar situation in not having a built-in
method to separate path components (although a simple generalized solution was
good enough in that case).

Thus without introducing a new structure and functions to deconstruct a URL
into scheme, authority, path, parameters, etc., some variation of this patch
will have to be used to address #352.
2017-05-06 18:54:42 -04:00
Jim Derry 66de84bc2b - Add support for the is attribute.
- Add support for autonomous custom elements.
2017-03-13 13:45:32 -04:00
Onni Hakala da27b5e339
Add optional xmlns:xlink attributes as valid to support inline svg
fixes #478
2017-01-09 01:38:16 +02:00
Marcos Caceres e4ae9c064d Add support for link 'as' attribute (closes #449) 2016-08-23 18:46:04 +10:00
Benjamin Esham 54179386be Add support for the "integrity" attribute
This attribute may be used on "link" and "script" elements. See
http://www.w3.org/TR/2016/REC-SRI-20160623/#element-interface-extensions
2016-07-24 10:24:30 -04:00
Benjamin Esham 9377f65f89 Add support for the HTML5 "crossorigin" attribute
This attribute can only be used on "link" elements.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#Attributes
2016-06-07 22:20:10 -04:00
Jim Derry 2ade3357a9 Phase 2
This is a MUCH SANER approach to what I was trying to do (now that I screwed up enough internals to understand some of them!
At this point there are zero exit state reversions, and zero markup reversions! There are still 21 errout reversions; I'll
annotate and adjust as necessary.
2016-02-13 11:31:16 +08:00
Jim Derry 74604fd52b Hard-coded checks are redundant with updates to attrdict.c. 2016-02-12 20:44:03 +08:00
Jim Derry 429703dce4 Because the previous effort #350 grew too fast and there was a LOT of side effects to
my changes, I'm starting over with this. Comments in the PR thread.

This commit reduces the size of attrdict.c while causing only a single errout
regression that is justified.
2016-02-12 19:34:19 +08:00
Geoff McLane 7d0d8a853a Issue #345 - discard leading spaces in href 2016-02-01 20:07:55 +01:00
Christopher Brannon 1ef5ba7968 Fix a tiny buffer overflow. 2015-11-23 12:28:00 -08:00
Shane McCarron c0b769c5c7 Initial cut at RDFa support (again)
New branch that implements support for RDFa attributes.  Should be
cleaner than my first attempt in PR #299 - also references issue #209
2015-11-16 11:29:23 -06:00
Geoff McLane c68ad42482 Revert 22a1922c35 2015-11-07 14:50:10 +01:00
Shane McCarron c572e3e3c8 Initial cut at supporting RDFa attributes. 2015-11-06 12:19:05 -06:00
Geoff McLane 79ac8b2554 Issue #185 - Treat elements ids as case-sensitive if in HTML5 mode 2015-03-13 19:47:28 +01:00
Geoff McLane 6e3b293985 Issue #130 - Add TidyAttr_DISPLAY for math tag 2015-02-13 18:37:07 +01:00
Geoff McLane d72e681d32 Issue #152 - add srcset and sizes to img tag 2015-02-06 19:24:04 +01:00
Geoff McLane 698396eaa0 Issue #149 - avoid crash on null attr value 2015-02-03 13:38:20 +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 f884da577d Small fix for TidyAttr_ASYNC to CH_BOOL 2015-01-20 18:10:13 +01:00
Geoff McLane 3f46000197 add allowfullscreen attribute exception 2015-01-18 20:59:27 +01:00
Geoff McLane 82fc656863 exception attr tabindex can begin with '-' 2015-01-18 14:46:12 +01:00
Jim Derry b8608380a2 Add support for 'role' attribute. #115 2014-11-22 20:44:38 +08:00
Jim Derry edb185a308 Use a hash table for anchors #64 2014-11-22 19:39:06 +08:00
Jim Derry 9a0b05cb69 Added HTML Microdata (itemprop, etc.) support. 2014-11-22 19:32:30 +08:00
Jim Derry 7754802884 Updated Aria attributes to geoffmcl's added tags; added missing aria-orientation. 2014-11-22 17:39:17 +08:00
Andrew Le 27d8ca6a69 Add support for aria attributes
Reference: http://dev.w3.org/html5/markup/aria/aria.html#aria-attrs-all
2013-06-28 16:50:54 -07:00
Peter Kelly 7fc3255542 Applied hash table optimisation to RemoveAnchorByNode. This function now takes
the anchor name as a parameter, so it can look in the correct bin.

In the case of FreeAttrs, we have the name already (since we found a name or
id attribute). In the case of FixAnchors, the anchor name could come from
either the name or id attribute, so we call the function separately for each
case, passing the appropriate attribute value.
2012-08-20 10:06:30 +07:00
Peter Kelly 11a8648818 Use a hash table for anchors 2012-08-20 00:29:16 +07:00
Craig Barnes ce27a729dc Remove CVS info blocks 2012-08-08 17:27:29 +01:00
Michael[tm] Smith a772bbb17f Let's actually commit the -gdoc feature this time. 2012-06-20 16:55:42 +09:00
Joaquin Cuenca Abela f91a020894 Accept HTML5 input types. 2012-06-07 16:54:04 +02:00
Michael[tm] Smith 3ed33a1823 Merge in TidyAttr_XML_LANG change. 2012-03-16 20:55:59 +09:00
Michael[tm] Smith 264c9bc043 HTML IDs can contain anything except whitespace.
Introduced TY_(IsHTMLSpace)(uint c), which checks to see if c is one of the
chars that the HTML spec (and browsers) treat as a space in attribute
values: 0x020 (space), 0x009 (tab), 0x00a (LF), 0x00c (FF), or 0x00d (CF).
Can't use ANSI C isspace(int c) here because like standard functions for
many other langs, it also treats 0x00b as a space.
2012-01-02 16:12:51 +09:00
Michael[tm] Smith 34305a13d1 report missing href & rel for link elements 2011-11-20 20:58:35 +09:00