From 74604fd52b606fdbd914e9abd1588a9fe8f3b0bd Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Fri, 12 Feb 2016 20:44:03 +0800 Subject: [PATCH] Hard-coded checks are redundant with updates to `attrdict.c`. --- src/attrs.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/src/attrs.c b/src/attrs.c index 5b52016..983caee 100644 --- a/src/attrs.c +++ b/src/attrs.c @@ -445,38 +445,11 @@ static uint AttributeVersions(Node* node, AttVal* attval) { uint i; - /* HTML5 data-* attributes - 20150118: added allowfullscreen */ + /* Override or add to items in attrdict.c */ if (attval && attval->attribute) { + /* HTML5 data-* attributes can't be added generically; handle here. */ if (TY_(tmbstrncmp)(attval->attribute, "data-", 5) == 0) return (XH50 | HT50); - if (strcmp(attval->attribute,"allowfullscreen") == 0) - return (XH50 | HT50); - /* RDFa global attributes */ - if (strcmp(attval->attribute,"about") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"datatype") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"inlist") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"prefix") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"property") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"resource") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"typeof") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"vocab") == 0) - return (XH50 | HT50); - /* Override the settings on these attributes because - * they are allowed everywhere by RDFa */ - if (strcmp(attval->attribute,"content") == 0) - return (HT20|HT32|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|HT50|XH50) ; - if (strcmp(attval->attribute,"rel") == 0) - return (HT20|HT32|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|HT50|XH50) ; - if (strcmp(attval->attribute,"rev") == 0) - return (HT20|HT32|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|HT50|XH50) ; } /* TODO: maybe this should return VERS_PROPRIETARY instead? */ if (!attval || !attval->dict)