From 9377f65f8974bc89347f3e0dba8491b192d85822 Mon Sep 17 00:00:00 2001 From: Benjamin Esham Date: Tue, 7 Jun 2016 22:20:10 -0400 Subject: [PATCH] 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 --- include/tidyenum.h | 1 + src/attrdict.c | 1 + src/attrs.c | 1 + 3 files changed, 3 insertions(+) diff --git a/include/tidyenum.h b/include/tidyenum.h index 4f74e8d..fbbfd65 100644 --- a/include/tidyenum.h +++ b/include/tidyenum.h @@ -553,6 +553,7 @@ typedef enum TidyAttr_COMPACT, /**< COMPACT= */ TidyAttr_CONTENT, /**< CONTENT= */ TidyAttr_COORDS, /**< COORDS= */ + TidyAttr_CROSSORIGIN, /**< CROSSORIGIN= */ TidyAttr_DATA, /**< DATA= */ TidyAttr_DATAFLD, /**< DATAFLD= */ TidyAttr_DATAFORMATAS, /**< DATAFORMATAS= */ diff --git a/src/attrdict.c b/src/attrdict.c index 5f70a8e..5e338f3 100644 --- a/src/attrdict.c +++ b/src/attrdict.c @@ -1950,6 +1950,7 @@ const AttrVersion TY_(W3CAttrsFor_LINK)[] = INCLUDE_MICRODATA { TidyAttr_CHARSET, xxxx|xxxx|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|xxxx|xxxx }, { TidyAttr_CLASS, xxxx|xxxx|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|HT50|XH50 }, /* CORE override */ + { TidyAttr_CROSSORIGIN, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, { TidyAttr_DIR, xxxx|xxxx|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|xxxx|HT50|XH50 }, /* CORE override */ { TidyAttr_HREF, HT20|HT32|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|HT50|XH50 }, { TidyAttr_HREFLANG, xxxx|xxxx|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|HT50|XH50 }, diff --git a/src/attrs.c b/src/attrs.c index f678245..da17fbd 100644 --- a/src/attrs.c +++ b/src/attrs.c @@ -279,6 +279,7 @@ static const Attribute attribute_defs [] = { TidyAttr_CONTENTEDITABLE, "contenteditable", CH_PCDATA }, { TidyAttr_CONTEXTMENU, "contextmenu", CH_PCDATA }, { TidyAttr_CONTROLS, "controls", CH_PCDATA }, + { TidyAttr_CROSSORIGIN, "crossorigin", CH_PCDATA }, { TidyAttr_DEFAULT, "default", CH_PCDATA }, { TidyAttr_DIRNAME, "dirname", CH_PCDATA }, { TidyAttr_DRAGGABLE, "draggable", CH_PCDATA },