[webkit-reviews] review requested: [Bug 53320] [Qt] QtWebKit does not properly handle D&D of a precent encoded URL... : [Attachment 82235] Patch for review

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Feb 12 09:41:50 PST 2011


Aparna Nandyal <aparna.nand at wipro.com> has asked  for review:
Bug 53320: [Qt] QtWebKit does not properly handle D&D of a precent encoded
URL...
https://bugs.webkit.org/show_bug.cgi?id=53320

Attachment 82235: Patch for review
https://bugs.webkit.org/attachment.cgi?id=82235&action=review

------- Additional Comments from Aparna Nandyal <aparna.nand at wipro.com>
This bug is due to the wrong encoding done in encodeWithURLEscapeSequences()
function. For example

- The url passed -  
https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false
&continue=http://mail.google.com/mail/?ui=html&zy=l&bsv=llya694le36z&scc=1&ltmp
l=default&ltmplcache=2

- The url returned -
https://www.google.com/accounts/ServiceLogin%3Fservice=mail&passive=true&rm=fal
se&continue=http://mail.google.com/mail/%3Fui=html&zy=l&bsv=llya694le36z&scc=1&
ltmpl=default&ltmplcache=2

- The url expected -
https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false
&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&bsv=llya6
94le36z&scc=1&ltmpl=default&ltmplcache=2


The expected URL is obtained when using QUrl's function toEncoded(). The
expected URL (in the encoded form) is infact the url that is there in the html
href tag.

As per this analysis there are 2 ways to solve this bug.
1. As in the patch encode the url using toEncoded()
2. Do not do any encoding. Convert the input QUrl to String and pass it back.
Replace the fix line with 
return String(urls().first().toString());


More information about the webkit-reviews mailing list