1) Allow no whitespace between public id and system id, like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2) Allow leading whitespace before DOCTYPE declaration starts, for example:
\r\n<!DOCTYPE HTML PUBLIC ...>
http://codereview.appspot.com/1850049/diff/10001/11003 File src/com/google/caja/parser/html/DoctypeMaker.java (right): http://codereview.appspot.com/1850049/diff/10001/11003#newcode93 src/com/google/caja/parser/html/DoctypeMaker.java:93: // XML does not allow the system id to ...
15 years, 11 months ago
(2010-08-04 06:13:49 UTC)
#1
http://codereview.appspot.com/1850049/diff/10001/11003 File src/com/google/caja/parser/html/DoctypeMaker.java (right): http://codereview.appspot.com/1850049/diff/10001/11003#newcode93 src/com/google/caja/parser/html/DoctypeMaker.java:93: // XML does not allow the system id to ...
15 years, 11 months ago
(2010-08-04 06:57:23 UTC)
#2
http://codereview.appspot.com/1850049/diff/18001/19001 File tests/com/google/caja/parser/html/DoctypeMakerTest.java (right): http://codereview.appspot.com/1850049/diff/18001/19001#newcode166 tests/com/google/caja/parser/html/DoctypeMakerTest.java:166: assertDoctype("html", "-//W3C//DTD HTML 4.01 Transitional//EN", On 2010/08/04 14:20:36, anupama.dutta ...
15 years, 11 months ago
(2010-08-04 14:47:56 UTC)
#5
http://codereview.appspot.com/1850049/diff/18001/19001
File tests/com/google/caja/parser/html/DoctypeMakerTest.java (right):
http://codereview.appspot.com/1850049/diff/18001/19001#newcode166
tests/com/google/caja/parser/html/DoctypeMakerTest.java:166:
assertDoctype("html", "-//W3C//DTD HTML 4.01 Transitional//EN",
On 2010/08/04 14:20:36, anupama.dutta wrote:
> Suggest adding a comment before this line:
> // Test whether omitting whitespace b/w public id and system id still allows
> doctype to be parsed correctly.
Done.
http://codereview.appspot.com/1850049/diff/21001/22002
File tests/com/google/caja/parser/html/DomParserTest.java (right):
http://codereview.appspot.com/1850049/diff/21001/22002#newcode1996
tests/com/google/caja/parser/html/DomParserTest.java:1996: public final void
testFindDoctypeIgnoresLeadingWhitespace() throws Exception {
On 2010/08/04 14:20:36, anupama.dutta wrote:
> Thanks for adding this thorough test :)
Thanks for the thorough review :D
On 2010/08/06 20:19:53, MikeSamuel wrote: > Thanks for putting this together. > > I submitted ...
15 years, 11 months ago
(2010-08-07 02:58:54 UTC)
#9
On 2010/08/06 20:19:53, MikeSamuel wrote:
> Thanks for putting this together.
>
> I submitted this patch on your behalf at
> http://code.google.com/p/google-caja/source/detail?r=4223
>
> Please mark this issue closed when you have a chance.
Thanks lots Mike.
Issue 1850049: [Caja] Making Doctype parsing more robust
(Closed)
Created 15 years, 11 months ago by gagan.goku
Modified 15 years, 11 months ago
Reviewers: cool-shindig-committers_googlegroups.com, anupama.dutta, MikeSamuel
Base URL: http://google-caja.googlecode.com/svn/trunk/
Comments: 9