This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12099 - Input type=url: value range
Summary: Input type=url: value range
Status: RESOLVED INVALID
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-16 15:13 UTC by Alex
Modified: 2011-08-04 05:01 UTC (History)
6 users (show)

See Also:


Attachments

Description Alex 2011-02-16 15:13:45 UTC
As per the specification below, it appears that <input type='url' /> fields will not support the special form URL localhost, I believe this to be an oversight as in many cases when querying the user for a url, especially in the case of most post-form applications of this input type, localhost is a perfectly valid response.

In example, a user is instructed to enter the information of a database to connect to, usually the response will be in the form of schema://<ipv4 addr> or localhost, however, occasionally it will take the form of a url [very likely one the user agent has encountered before].  Forcing this application to use the type='text' field will under-utilize the information the user-agent may be able to supply to the user.

As an aside, thank you for your time in reviewing this.  I am quite excited about the new introductions into the html standard this offers as it may help move web development away from reliance on obscure or arcane classes/ids.

4.10.7.1.4 URL state

The value attribute, if specified, must have a value that is a valid URL potentially surrounded by spaces that is also an absolute URL

2.6 URLs

A URL is an absolute URL if resolving it results in the same output regardless of what it is resolved relative to, and that output is not a failure.

An absolute URL is a hierarchical URL if, when resolved and then parsed, there is a character immediately after the <scheme> component and it is a U+002F SOLIDUS character (/).

An absolute URL is an authority-based URL if, when resolved and then parsed, there are two characters immediately after the <scheme> component and they are both U+002F SOLIDUS characters (//).

To parse a URL url into its component parts, the user agent must use the parse an address algorithm defined by the IRI specification. [RFC3987]
Comment 1 Boris Zbarsky 2011-02-16 18:34:14 UTC
Maybe I'm missing something but "localhost" is not a valid url, right?  "http://localhost" would be (as would "ssh://localhost" which means something totally different).
Comment 2 Aryeh Gregor 2011-02-17 01:05:38 UTC
http://localhost is a valid URL for <input type=url> per the spec as far as I can tell.  Why do you think otherwise?
Comment 3 Alex 2011-02-17 01:07:12 UTC
Valid points, closing.
Comment 4 Michael[tm] Smith 2011-08-04 05:01:06 UTC
mass-moved component to LC1