Version: 3.2.2 (using KDE 3.2.2, Gentoo) Compiler: gcc version 3.3.3 20040412 (Gentoo Hardened Linux 3.3.3-r6, ssp-3.3.2-2, pie-8.7.6) OS: Linux (i686) release 2.4.20-wolk4.0s-pre9 I include 2 html files. The first is rendered fine. The second is rendered wrong. The difference is the space between 'checked' and '/'. Both are valid ISO-HTML and should be rendered the same. The first: <!DOCTYPE HTML PUBLIC "ISO/IEC 15445:2000//DTD HTML//EN"> <html><head><title>T</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <form action="" method="get" accept-charset="utf-8"> <div><input type="radio" name="ms" value="ht" checked /></div> </form> </body></html> The second: <!DOCTYPE HTML PUBLIC "ISO/IEC 15445:2000//DTD HTML//EN"> <html><head><title>T</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <form action="" method="get" accept-charset="utf-8"> <div><input type="radio" name="ms" value="ht" checked/></div> </form> </body></html>
Reference to the spec? I never heared of ISO-HTML before
Use Google: http://www.cs.tcd.ie/15445/15445.HTML ISO-HTML is a standard, not a recommendation. validator.w3c.org can validate ISO-HTML.
2nd example comes us selected in mozilla 1.7.3 and unselected in kde 3.3.1. 1st example works fine.
*** Bug 120347 has been marked as a duplicate of this bug. ***
*** Bug 94630 has been marked as a duplicate of this bug. ***
SVN commit 576632 by ggarand: support parsing of attribute/> not taking WC patch on this one has it looks a tad cheesy. BUG: 87221 M +10 -5 htmltokenizer.cpp --- branches/KDE/3.5/kdelibs/khtml/html/htmltokenizer.cpp #576631:576632 @@ -904,8 +904,16 @@ unsigned int a; cBuffer[cBufferPos] = '\0'; a = khtml::getAttrID(cBuffer, cBufferPos); - if ( !a ) - attrName = QString::fromLatin1(QCString(cBuffer, cBufferPos+1).data()); + if ( !a ) { + // did we just get /> or e.g checked/> + if (curchar == '>' && cBufferPos >=1 && cBuffer[cBufferPos-1] == '/') { + currToken.flat = true; + if (cBufferPos>1) + a = khtml::getAttrID(cBuffer, cBufferPos-1); + } + if (!a) + attrName = QString::fromLatin1(QCString(cBuffer, cBufferPos+1).data()); + } dest = buffer; *dest++ = a; @@ -915,9 +923,6 @@ else kdDebug( 6036 ) << "Known attribute: " << QCString(cBuffer, cBufferPos+1).data() << endl; #endif - // did we just get /> - if (!a && cBufferPos == 1 && *cBuffer == '/' && curchar == '>') - currToken.flat = true; tag = SearchEqual; break;