[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev Patch for termination of named entity in CGI query string
From: |
Steve Harvey |
Subject: |
lynx-dev Patch for termination of named entity in CGI query string |
Date: |
Tue, 13 Aug 2002 00:52:13 -0400 |
User-agent: |
Mutt/1.2.5.1i |
Hello,
A major job search web site doesn't work with lynx because of
the following problem.
An anchor tag contains a CGI query string with multiple parameters
with names beginning with pi_ . Lynx sees the preceeding ampersand
and interprets the '&pi' as though it were an entity reference,
with the result that the string '&pi' is replaced by the UTF-8
encoding for π .
I.e. <a href="http://www.domain.com/some.cgi?pi_x=1&pi_y=0">link</a>
turns into a request for
http://www.domain.com/some.cgi?pi_x=1%CF%80_y=0
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.
The following corrects this behaviour for this special case.
--- src/LYCharUtils.c.orig Tue May 28 15:41:42 2002
+++ src/LYCharUtils.c Mon Aug 12 15:41:19 2002
@@ -1885,7 +1885,7 @@
** if &yz string happened to be a recognized entity name. - LP
*/
if ( ((code = HTMLGetEntityUCValue(name)) > 0) &&
- !((cpe == '=') && (stype == st_URL)) ) {
+ !(((cpe == '=') || (cpe == '_')) && (stype == st_URL)) ) {
state = S_check_uni;
break;
}
--
Steve Harvey
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
- lynx-dev Patch for termination of named entity in CGI query string,
Steve Harvey <=