[Webkit-unassigned] [Bug 29913] New: typeMismatch for type=url is not compliant to standards, and incompatible in KURL implementations

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 30 00:01:18 PDT 2009


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

           Summary: typeMismatch for type=url is not compliant to
                    standards, and incompatible in KURL implementations
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
               URL: http://www.w3.org/html/wg/href/draft
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Forms
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: tkent at chromium.org
                CC: fishd at chromium.org, pkasting at google.com,
                    brettw at chromium.org, darin at apple.com,
                    micdesim at gmail.com
        Depends on: 27456
            Blocks: 19264


LayoutTests/fast/forms/ValidityState-typeMismtch-url.html fails on Chromium
port because KURL implementation in Chromium is different from other ports, and
host name validation rules are mismatched between the normal KURL and Chromium
KURL.

> FAIL http://www.g**gle.com is an incorrect valid url.
> FAIL http:// www.google.com is an incorrect valid url.
> FAIL http://www .google.com is an incorrect valid url.
> FAIL http://www.
google.
com is an incorrect valid url.
> FAIL http://host+ is an incorrect valid url.
> FAIL http://myurl! is an incorrect valid url.

The ASCII host name rule in the normal KURL is like:
  HEXDIG = "0-9A-Fa-f"
  KURL_IPV6ADDR = "[" + HEXDIG + ":]+"
  ALPHADIGIT = "0-9A-Za-z"
  KURL_HOST = "¥¥[" + KURL_IPV6ADDR + "]|[-._" + ALPHADIGIT + "]*"

The ASCII host name rule in Chromium KURL, GoogleURL, is like:
  PCT_ENCODED = "%[" + HEXDIG + "]{2}"
  GURL_HOST = "(" + PCT_ENCODED + "|[- !"#$&'()*+,.:<=>@[]_`{|}" + ALPHADIGIT +
"])*"

HTML5's URL type is an absolute URI or an absolute IRI.  URI (RFC3986)'s host
name rule is like:
  IPV6ADDR = "[" + HEXDIG + ":.]+"
  UD = "-!$&'()*+,.;=_~" + ALPHADIGIT
  IPADDR = "(" + IPV6ADDR + "|v[0-9]¥.[:" + UD + "]+)"
  URI_HOST = "¥¥[" + IPADDR + "]|(" + PCT_ENCODED + "|[" + UD + "])*"


IMO,
 - Changing GoogleURL so that it has the same rules as KURL
 - Changing KURL so that it has the same rules as GoogleURL
 - Changing both of GoogleURL and KURL so that they are compliant to the
standards strictly
They DON'T work well because I think KURL and GoogleURL have practical reasons
of the non-standard rules.

Should we have dedicated URL validator for <input type=url>?  In that case, how
to check IDN validity?

-- 
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