[Webkit-unassigned] [Bug 86873] Intent::create() throws is service is "url://a url"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 21 10:56:57 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=86873





--- Comment #3 from Christophe Dumez <christophe.dumez at intel.com>  2012-05-21 10:55:58 PST ---
I'm not sure I understand, the 2 checks in questions seem to be for valid URL case since they don't expect the constructor to throw.

If I understand correctly, the issue is that 'url://a url' is valid for GURL but not for KURL. A (tested) solution for this would be to do:

     KURL serviceUrl;
     if (options.get("service", service) && !service.isEmpty()) {
-      serviceUrl = KURL(KURL(), service);
+      serviceUrl = KURL(KURL(), encodeWithURLEscapeSequences(service));
       if (!serviceUrl.isValid()) {
           ec = SYNTAX_ERR;
           return 0;

Calling encodeWithURLEscapeSequences() on the string before passing it to KURL constructor will make it behave as expected by the test. Is this an appropriate solution or should we somehow change the test case instead?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list