Howdy, WebKit custodians!

I've been chasing my tail all morning trying to sort out a problem with URLs, and I traced it down to the FieldStorage class.

I've recently realized that, with XHTML (and XML), ampersands in URLs must be encoded as "entity references" (see item C.12 in http://www.w3.org/TR/xhtml1/), as in:

        http://10.0.0.1/wk/admin/view?id=57&objectType=books

More typically, you would see the following, which is WRONG and INVALID:

        http://10.0.0.1/wk/admin/view?id=57&objectType=books

I've been going through my code to correct for this issue so my web pages validate.

However, I've discovered that WebKit, because FieldStorage doesn't decode querystrings correctly, will butcher the querystring variables accordingly:

        {
                'id' : "57",
                'amp;objectType' : "books",
        }

WebKit's FieldStorage class implements a method parse_qs. I was able to fix the problem experimentally by inserting simply inserting a line in FieldStorage that decodes the raw querystring in self._qs right before that method tries to split the string on "&". I'm simply used the decodeHTML function from WebUtils.Funcs for the purpose.

Thoughts?

Martin Doudoroff
dAlchemy



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to