[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Patch for termination of named entity in CGI query string
From: |
David Woolley |
Subject: |
Re: lynx-dev Patch for termination of named entity in CGI query string |
Date: |
Tue, 13 Aug 2002 07:46:44 +0100 (BST) |
> I don't know why the parser does not insist upon the terminating
> semicolon being present, presumably for compatibility with non-w3c
> compliant web pages.
Because the big 2 don't require the terminating ;, although I think
it might actually be required by the specification. The real bug
is that the HTML specification considers _ to be a name character,
so the error recovery shouldn't trigger until the =.
It is unfortunately a very common error that people use & when quoting
a form URL in a link context. The HTML specification even has an
appendix about the problem, advising that CGI scripts that are likely
to be used in this way accept ; as an alternative to &. I believe
ASP does do this.
The cleaner fix for this would be to read the whole entitiy name,
noting that not only _, but also . - and : are legal characters, before
looking for the error recovery case of having a following =, and regurgitate
the whole name if the entity is undefined.
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden