Summary: | & and & in link do not get converted to & | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Travis Goodspeed <travis> | ||||||||||||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||
Severity: | Major | CC: | ap, bryce1, jrn2005 | ||||||||||||||
Priority: | P2 | ||||||||||||||||
Version: | 412 | ||||||||||||||||
Hardware: | Mac | ||||||||||||||||
OS: | OS X 10.4 | ||||||||||||||||
URL: | http://bug.mathaddicts.org/ | ||||||||||||||||
Attachments: |
|
Description
Travis Goodspeed
2005-07-05 04:28:38 PDT
Created attachment 2806 [details]
testcase application/xhtml+xml
Created attachment 2807 [details]
testcase application xhtml+xml
Created attachment 2808 [details]
testcase text/html
common text/html testcase
Created attachment 2809 [details]
testcase text/xml
testcases don't work yet, the url shows a testcase that does... it IS a bug tho :) Created attachment 2811 [details]
testcase application/xhtml+xml
testcases work now. It seems that webkit just doesn't change & into & but it DOES change & into &. Renaming bug. Created attachment 4014 [details]
Instruct libXML to parse entities
The problem originated in the switch to libXML as the standard XML parser.
LibXML will not parse entities by default and must be explicitly instructed to
do so. The previous Qt parser works the other way around. This patch will turn
on entity parsing for libXML.
Comment on attachment 4014 [details]
Instruct libXML to parse entities
Looks good to me. I believe Eric Seidel is already working on this.
Comment on attachment 4014 [details] Instruct libXML to parse entities This patch AFAIK won't actually do anything. Intructing it is only really half the battle. If you look at my patch: http://bugzilla.opendarwin.org/attachment.cgi?id=3953 you'll see the rest of the improvements I needed to make for Entity support. Eric: This patch does do something. It enables libxml's build-in entity support. This build-in support is limited to numeric entities and the standard named entities defined in XML (quot, amp, lt, gt), which is exactly what this bug is about. It looks like your patch will do the same and additionally add support for other named entities (bug 4301), so my patch not needed anymore. This seems fixed. *** This bug has been marked as a duplicate of 4301 *** Actually, this one is fixed, but independent of bug 4301. *** Bug 11655 has been marked as a duplicate of this bug. *** As I'm still seeing this bug in version 419.3, I'm wondering when we'll see a fixed version? Okay, what I really mean is, was the patch never committed into the source, or has this been broken again since fixing? I've just tested, and it works correctly in the latest nightly build: <http://nightly.webkit.org>. Vendors (such as Apple, Omni or Adobe) do not provide information about their release plans, and if you need this particular bugfix to be released ASAP, you'd have to contact each of them directly, unfortunately. I still see this in Safari 2.0.4 (419.3). AFIK, it is impossible to send more than one parameter back to the server in a xml document, such as XHTML MP (Mobile Profile), if it's served as xml: test.xhtml <?xml version="2.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>City CarShare - Neigborhood Vehicles</title></head> <body> <h2><img src="logo.png" alt="" />City CarShare</h2> <p> City CarShare is a Bay Area nonprofit on a mission to provide convenient, affordable access to cars so that we can reduce individual car ownership... <a href="http://www.citycarshare.org/">www.citycarshare.org</a><br/> <a href="http://www.citycarshare.org/test.xhtml?foo=1234&fum=4567">test1</a><br/> <a href="http://www.citycarshare.org/test.xhtml?foo=1234&fum=4567">test2</a><br/> </p> </body> </html> The above XML escapes the amperstand, as it must to do validate. Safari converts the & to the & entity. The & entity is left untouched. Thus both URL's are damaged at the time the server gets them. Is there a trick to get past this? It' s not fixed! I have a similar problem with a download link that uses javascript . This website uses javascript to send a php file the name of the file and another parameter: <a onclick= return dld(php_file?param1=%2F&file='name')></a> This link works in all other browser tested: Opera, Firefox, Internet Explorer. Problem appears both on the Mac and Windows version of Safari (3.0.2 the Windows version). Ugh, reopening. There was no fix in this bug, and apparently no regression case, sadly. Broke between r18068 and r23922, I think we should find out when this happened (in case it was a test-less fix for some other bug). Hmm, I'm almost sure that I could reproduce this yesterday, but now I can not (of course, this still happens with shipping 10.4 Safari/WebKit, but that's not the point).
Help with testing needed.
> <a onclick= return dld(php_file?param1=%2F&file='name')></a>
Gheorghe, this bug was only about XHTML, and your snippet is plain HTML. Please file a new bug for this issue.
It works for me with the current webkit, and the http://www.citycarshare.org/ example posted above. OK, so I guess it was my testing mistake. Sorry for the noise. |