From 7db371ebe9d770cb1bd977b5698fd698ab0e399b Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 8 Dec 2018 13:22:24 +0100 Subject: XHTML incorrect attribute values for align and valign The attribute values of the `align` and `valign` attribute have to be in lowercase and the `valign` attribute value `center` does not exist but has to be `middle`. Most browsers do accept the 'incorrect' values but it is better to have the right values present. (Found by means of the CGAL/cgal repository) --- src/doctokenizer.l | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/doctokenizer.l b/src/doctokenizer.l index dd2c183..deac51c 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -262,6 +262,12 @@ static void handleHtmlTag() if (i<(int)yyleng) c=tagText.at(++i); } opt.value = tagText.mid(startAttrib,endAttrib-startAttrib); + if (opt.name == "align") opt.value = opt.value.lower(); + else if (opt.name == "valign") + { + opt.value = opt.value.lower(); + if (opt.value == "center") opt.value="middle"; + } } else // start next option { -- cgit v0.12