I think it should accept all valid URLs and should also add http:// if no protocol is specified.
Massimo On Nov 4, 4:35 am, Jonathan Benn <[EMAIL PROTECTED]> wrote: > Hi Massimo, > > On Nov 4, 10:19 am, mdipierro <[EMAIL PROTECTED]> wrote: > > > the problem is not writing the regex, it is figuring out what should > > be validated and what not. > > The current version was the result of some negotiation with users. > > > Send me a patch and if no objections it will get in. > > Right, and this brings back my main question: what are requirements > for IS_URL? I was reading through some of the past debates, and it > looks like you want a certain degree of flexibility, but you don't > want all valid URLs to be accepted either. For example, it seems that > you don't want to accept any spaces or other special characters. > However, you do want to support most common protocol schemes (e.g. > http, ftp, etc.). And it seems that you want to support using ports. > > I personally believe that any valid URL should be accepted by IS_URL. > But perhaps there is also a need for a more restrictive version that > only accepts the kinds of URLs that web2py would serve (e.g. those > without special characters). > > What do you think? > > --Jonathan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---