Bug 12237 - Can't render ampersands in URLs if content type is application/xhtml+xml
Summary: Can't render ampersands in URLs if content type is application/xhtml+xml
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 419.x
Hardware: Mac OS X 10.4
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-12 18:58 PST by Rick Mann
Modified: 2007-01-13 03:24 PST (History)
0 users

See Also:


Attachments
Test case (316 bytes, application/xhtml+xml)
2007-01-12 20:49 PST, David Kilzer (:ddkilzer)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Mann 2007-01-12 18:58:02 PST
If I serve a page as "application/xhtml+xml", and include something like the following in the markup:

    <a href="SearchSubmit.do?t=e&amp;fid=&amp;ps=&amp;p=2">next</a>

Then the URI that Safari wants to go to is:

    http://localhost/dvd/SearchSubmit.do?t=e&#38;fid=&%2338;ps=&%2338;p=2

However, if I serve it as "text/html", the URI is properly interpreted:

    http://localhost/dvd/SearchSubmit.do?t=e&fid=&ps=&p=2

If I try to build the URL using only ampersands, and not &amp;, then if served as "application/xhtml+xml", Safari complains about the markup.

Firefox behaves correctly on the exact same page. Top of the page is served with:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Comment 1 David Kilzer (:ddkilzer) 2007-01-12 20:49:52 PST
Created attachment 12410 [details]
Test case
Comment 2 David Kilzer (:ddkilzer) 2007-01-12 21:09:51 PST
When I try to load Attachment 12410 [details] in a locally-built debug build of WebKit r18818 with Safari 2.0.4 (419.3) on Mac OS X 10.4.8 (8L127), I don't see the problems you describe below.

Can you attach a test case that reproduces the bug, or does Attachment 12410 [details] reproduce this for you?

Do you have any Haxies or InputManagers installed with Safari?

Comment 3 David Kilzer (:ddkilzer) 2007-01-12 21:12:09 PST
Confirmed in shipping Safari 2.0.4 (419.3) on Mac OS X 10.4.8 (8L127).
Comment 4 David Kilzer (:ddkilzer) 2007-01-12 21:15:12 PST
This issue has been fixed in WebKit ToT (tip of tree).  You can try out a WebKit nightly build (download the DMG, mount it, then double-click on the WebKit icon) to verify that this is fixed:

http://nightly.webkit.org/

Comment 5 Rick Mann 2007-01-12 22:14:11 PST
Yep, appears to work correctly in r18821. Thank you! (By the way, when does an update go out to everyone?)

For the record, I have no Haxies nor InputManagers installed. The attached test case DOES reproduce the problem in 419.3.

I was not sure what your comment (#3) meant: did you mean that you experienced the bug with it, or did you mean that you cannot reproduce it?
Comment 6 David Kilzer (:ddkilzer) 2007-01-13 03:24:26 PST
(In reply to comment #5)
> Yep, appears to work correctly in r18821. Thank you! (By the way, when does an
> update go out to everyone?)

See Bug 12199 Comment #3.

> I was not sure what your comment (#3) meant: did you mean that you experienced
> the bug with it, or did you mean that you cannot reproduce it?

Comment #3 in this bug meant that I was able to reproduce the bug using shipping Safari.

Sorry for any confusion!