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
1 changed files with 5 additions and 2 deletions

View File

@ -2015,8 +2015,11 @@ void CheckScroll( TidyDocImpl* doc, Node *node, AttVal *attval)
/* checks dir attribute */
void CheckTextDir( TidyDocImpl* doc, Node *node, AttVal *attval)
{
ctmbstr const values[] = {"rtl", "ltr", "auto", NULL};
CheckAttrValidity( doc, node, attval, values );
ctmbstr const values4[] = { "rtl", "ltr", NULL };
/* 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 */