PR #712 - Only allow 'auto' on 'dir' for HTML5

modified:   src/attrs.c
This commit is contained in:
Geoff McLane 2018-04-23 19:00:36 +02:00
parent 3475d3e8cd
commit 8723681275

View file

@ -2015,8 +2015,11 @@ void CheckScroll( TidyDocImpl* doc, Node *node, AttVal *attval)
/* checks dir attribute */ /* checks dir attribute */
void CheckTextDir( TidyDocImpl* doc, Node *node, AttVal *attval) void CheckTextDir( TidyDocImpl* doc, Node *node, AttVal *attval)
{ {
ctmbstr const values[] = {"rtl", "ltr", "auto", NULL}; ctmbstr const values4[] = { "rtl", "ltr", NULL };
CheckAttrValidity( doc, node, attval, values ); /* PR #712 - add 'auto' for HTML5 - @doronbehar */
ctmbstr const values5[] = { "rtl", "ltr", "auto", NULL };
CheckAttrValidity(doc, node, attval,
(TY_(IsHTML5Mode)(doc) ? values5 : values4));
} }
/* checks lang and xml:lang attributes */ /* checks lang and xml:lang attributes */