Re: [whatwg] input type=url allow URLs without http:// prefix

2009-07-27 Thread Ian Hickson
On Sun, 12 Jul 2009, Bruce Lawson wrote:
 
 The eleventy squillion WordPress sites out there that allow comments ask 
 for your web page address as well as name and email. The method of 
 entering a URL does not require the http:// prefix; just beginning the 
 URL with www is accepted.
 
 As it's very common for people to drop the http:// prefix on 
 advertising, business cards etc (and who amongst us reads out the prefix 
 when reading a URL on the phone?) I'd like to suggest that input 
 type=url allows the http:// prefix to be optional on input and, if 
 ommitted, be assumed when parsing.

Assuming you mean user input, it already is allowed to be optional; the 
spec doesn't prevent the user agent from doing whatever they want in terms 
of fixups.

On Mon, 13 Jul 2009, Ian Pouncey wrote:
 On Sun, Jul 12, 2009 at 3:48 PM, Kornel Lesinskikor...@geekhood.net 
 wrote:
  On Sun, 12 Jul 2009 09:46:19 +0100, Bruce Lawson bru...@opera.com 
  wrote:
 
  As it's very common for people to drop the http:// prefix on 
  advertising, business cards etc (and who amongst us reads out the 
  prefix when reading a URL on the phone?) I'd like to suggest that 
  input type=url allows the http:// prefix to be optional on input 
  and, if ommitted, be assumed when parsing.
 
  The spec explicitly allows that actual value seen and edited by the 
  user in the interface is different from DOM value of the input, so 
  browsers are free to prepend http:// automatically (and IMHO should � 
  DSK-253195).
 
 To make this less ambiguous I would prefer that we talk about making it 
 optional to specify a protocol or scheme name (personal preference for 
 protocol) rather than http:// specifically. While http will be the most 
 common protocol by far it is not the only possibility.

The scheme is not optional in the submission format.


 I have no problems with the idea though, I just think there needs to be 
 a mechanism for highlighting the change to the user rather than this 
 being hidden in the DOM.

That's a UI issue, which is more or less out of scope of the spec.


On Mon, 13 Jul 2009, Bruce Lawson wrote:
 
 Excellent. And, while I don't doubt you at all, I'm abashed that I 
 missed that nuance, especially as it'#s explicitly allowed?  Where would 
 I find that in the spec?

On Mon, 13 Jul 2009, Kornel wrote:
 
 The URL state section says that value in DOM may be different from 
 value in the user interface:
 
 http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#url-state
 
 The example difference given in the spec is URL-escaping, but in my 
 understanding, it should allow to prepending of protocol as well (I 
 admit that last bit is not stated explicitly).

Right.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Re: [whatwg] input type=url allow URLs without http:// prefix

2009-07-13 Thread Ian Pouncey
On Sun, Jul 12, 2009 at 3:48 PM, Kornel Lesinskikor...@geekhood.net wrote:
 On Sun, 12 Jul 2009 09:46:19 +0100, Bruce Lawson bru...@opera.com wrote:

 As it's very common for people to drop the http:// prefix on advertising,
 business cards etc (and who amongst us reads out the prefix when reading a
 URL on the phone?) I'd like to suggest that input type=url allows the
 http:// prefix to be optional on input and, if ommitted, be assumed when
 parsing.

 The spec explicitly allows that actual value seen and edited by the user in
 the interface is different from DOM value of the input, so browsers are free
 to prepend http:// automatically (and IMHO should – DSK-253195).

To make this less ambiguous I would prefer that we talk about making
it optional to specify a protocol or scheme name (personal preference
for protocol) rather than http:// specifically. While http will be the
most common protocol by far it is not the only possibility.

I'm wary of automagically prepending values if it is not clear what
has been added by the user agent compared to what has been added by
the user. Thoughts of end users complaining that the information the
site owner has on record is not what was entered without a clear log
of the change spring to mind. Might sound far-fetched but I'm guessing
most of us have heard weirder complaints.

I have no problems with the idea though, I just think there needs to
be a mechanism for highlighting the change to the user rather than
this being hidden in the DOM.

Regards,
Ian Pouncey.


Re: [whatwg] input type=url allow URLs without http:// prefix

2009-07-13 Thread Bruce Lawson
On Sun, 12 Jul 2009 15:48:51 +0100, Kornel Lesinski kor...@geekhood.net  
wrote:


On Sun, 12 Jul 2009 09:46:19 +0100, Bruce Lawson bru...@opera.com  
wrote:



I'd like to suggest that input
type=url allows the http:// prefix to be optional on input and, if  
ommitted, be assumed when parsing.


The spec explicitly allows that actual value seen and edited by the user  
in the interface is different from DOM value of the input, so browsers  
are free to prepend http:// automatically (and IMHO should – DSK-253195).



Excellent. And, while I don't doubt you at all, I'm abashed that I missed  
that nuance, especially as it'#s explicitly allowed?  Where would I find  
that in the spec?




--
Hang loose and stay groovy,

Bruce Lawson
Web Evangelist
www.opera.com (work)
www.brucelawson.co.uk (personal)


Re: [whatwg] input type=url allow URLs without http:// prefix

2009-07-13 Thread Kornel

On 13 Jul 2009, at 08:52, Bruce Lawson wrote:


I'd like to suggest that input
type=url allows the http:// prefix to be optional on input and,  
if ommitted, be assumed when parsing.


The spec explicitly allows that actual value seen and edited by the  
user in the interface is different from DOM value of the input, so  
browsers are free to prepend http:// automatically (and IMHO should  
– DSK-253195).


Excellent. And, while I don't doubt you at all, I'm abashed that I  
missed that nuance, especially as it'#s explicitly allowed?  Where  
would I find that in the spec?


The URL state section says that value in DOM may be different from  
value in the user interface:


http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#url-state

The example difference given in the spec is URL-escaping, but in my  
understanding, it should allow to prepending of protocol as well (I  
admit that last bit is not stated explicitly).


--
regards, Kornel



Re: [whatwg] input type=url allow URLs without http:// prefix

2009-07-12 Thread Geoffrey Sneddon


On 12 Jul 2009, at 10:46, Bruce Lawson wrote:

The eleventy squillion WordPress sites out there that allow comments  
ask for your web page address as well as name and email. The method  
of entering a URL does not require the http:// prefix; just  
beginning the URL with www is accepted.


As it's very common for people to drop the http:// prefix on  
advertising, business cards etc (and who amongst us reads out the  
prefix when reading a URL on the phone?) I'd like to suggest that  
input type=url allows the http:// prefix to be optional on input  
and, if ommitted, be assumed when parsing.


How do we tell apart foo.html (a relative URL) and example.com (a  
host name)?



--
Geoffrey Sneddon
http://gsnedders.com/



Re: [whatwg] input type=url allow URLs without http:// prefix

2009-07-12 Thread Bruce Lawson
On Sun, 12 Jul 2009 10:15:50 +0100, Geoffrey Sneddon  
foolist...@googlemail.com wrote:



How do we tell apart foo.html (a relative URL) and example.com (a  
host name)?


good point. It never occurred to me that relative URLs would be entered.  
What's the use case?


--
Hang loose and stay groovy,

Bruce Lawson
Web Evangelist
www.opera.com (work)
www.brucelawson.co.uk (personal)


Re: [whatwg] input type=url allow URLs without http:// prefix

2009-07-12 Thread Kornel Lesinski

On Sun, 12 Jul 2009 09:46:19 +0100, Bruce Lawson bru...@opera.com wrote:

As it's very common for people to drop the http:// prefix on  
advertising, business cards etc (and who amongst us reads out the prefix  
when reading a URL on the phone?) I'd like to suggest that input  
type=url allows the http:// prefix to be optional on input and, if  
ommitted, be assumed when parsing.


The spec explicitly allows that actual value seen and edited by the user  
in the interface is different from DOM value of the input, so browsers are  
free to prepend http:// automatically (and IMHO should – DSK-253195).


--
regards, Kornel Lesinski