Re: #68049 filter_var echo wrong result for a url

From: Date: Mon, 22 Sep 2014 07:20:26 +0000
Subject: Re: #68049 filter_var echo wrong result for a url
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-77429@lists.php.net to get a copy of this message
I've recently proposed a refactoring of FILTER_VALIDATE_URL: https://github.com/php/php-src/pull/826 I can easily add the support of this new flag is everyone agree. 2014-09-22 9:09 GMT+02:00 Florian Margaine <florian@margaine.com>: > Oh, IE. *sigh* > > Adding a new flag sounds like a good idea indeed, > FILTER_VALIDATE_UNCOMPLIANT_URL sounds good enough? > > I guess it should accept underscores and domain names starting with > numbers too. > > Regards, > > *Florian Margaine* > > P.S: sorry Kevin for the double mail. > Le 22 sept. 2014 09:03, "Kévin Dunglas" <dunglas@gmail.com> a écrit : > >> Some browsers do. Some versions of IE are buggy when the URL include >> underscores: >> >> http://stackoverflow.com/questions/794243/internet-explorer-ignores-cookies-on-some-domains-cannot-read-or-set-cookies >> >> >> I think that filter_var must follow the RFC by default. Maybe can we add >> a flag to allow malformed URL in use in the wild? >> >> >> >> 2014-09-21 10:42 GMT+02:00 Florian Margaine <florian@margaine.com>: >> >>> Hi, >>> >>> According to https://bugs.php.net/bug.php?id=51192 , >>> valid URLs cannot >>> contain underscores. >>> >>> The following bug was reported a couple days ago: >>> https://bugs.php.net/bug.php?id=68049 >>> >>> The thing is, browsers *do* accept the underscore in URLs. Should the >>> rfc3986 >>> <http://tools.ietf.org/html/rfc3986#section-3.2.2> be >>> respected, or >>> should PHP be lenient like browsers and accept more? >>> >>> Regards, >>> >>> *Florian Margaine* >>> >> >> >> >> -- >> Kévin Dunglas >> Consultant et développeur freelance >> >> http://dunglas.fr >> Tél. : 06 60 91 20 20 >> > -- Kévin Dunglas Consultant et développeur freelance http://dunglas.fr Tél. : 06 60 91 20 20

« previous php.internals (#77429) next »