Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77324 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24057 invoked from network); 19 Sep 2014 00:04:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2014 00:04:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.46 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.220.46 mail-pa0-f46.google.com Received: from [209.85.220.46] ([209.85.220.46:41671] helo=mail-pa0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 22/13-07171-D137B145 for ; Thu, 18 Sep 2014 20:04:45 -0400 Received: by mail-pa0-f46.google.com with SMTP id kq14so2581684pab.5 for ; Thu, 18 Sep 2014 17:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=OSTNEtjhjKMGoJGxLrNwuDf5jczFUj1Zdo0vAC94f1c=; b=n2oWoCksegtHLKTzpETDeuhwzf/Jkets7ZQ+VvJIBey0xPdhXX0IPlyn4NSJcBkA+h rQyqb3X5Tzt7YCJTPP47I+Y8MW3DfQoaNPP7cUW7cdxmDsPdypnSb/gw353fmbdt1AzP OY1spNt2mHkYf1PbSAW6Lm20gXYFlKDtCHNaDaxyeVRaVUbrWGo01YTVK4HohrUuRR0/ KJ1E0lOxTSBO//eob/QHJsIFZoUDx+Lc81YBb0nw92SBTWI3cshnKP/vvy33h/uOuTk2 28ZQbzfsOxVkFrhED3XMb1VtoI8G69InYyRA09R02aY/GzDNrCTHkitKmxaRBo2hcfAq qQxw== X-Received: by 10.68.195.74 with SMTP id ic10mr10704876pbc.93.1411085082398; Thu, 18 Sep 2014 17:04:42 -0700 (PDT) Received: from [192.168.1.102] (bb121-7-198-24.singnet.com.sg. [121.7.198.24]) by mx.google.com with ESMTPSA id cn3sm137289pbc.67.2014.09.18.17.04.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Sep 2014 17:04:41 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: Date: Fri, 19 Sep 2014 08:04:37 +0800 Cc: =?windows-1252?Q?K=E9vin_Dunglas?= , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: References: To: Andrea Faulds X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] Internationalized Domain Name support in FILTER_VALIDATE_URL From: tjerk.meesters@gmail.com (Tjerk Meesters) On 19 Sep 2014, at 06:52, Andrea Faulds wrote: >=20 > On 18 Sep 2014, at 21:26, K=E9vin Dunglas wrote: >=20 >> I'm working on enhancing the FILTER_VALIDATE_URL filter ( >> https://github.com/php/php-src/pull/826). >> The current implementation does not support validation of = internationalized >> domain names (i.e: http://www.acad=E9mie-fran=E7aise.fr/ >> ). >>=20 >> Support of IDN validation can be easily added using ICU's = uidna_toASCII() >> function. >>=20 >> Is it acceptable to add a dependency to ICU for ext/filter? >> Another option is to add a HAVE_ICU constant in main/php_config.h and = to >> validate IDN only if ICU is present. >>=20 >> What strategy is preferred? >=20 > Perhaps add a new filter that covers normal URLs and IDN ones? I just = imagine it might cause problems if suddenly IDNs are accepted, if there = is a backend which can=92t handle them. We don=92t need a new filter, you can simply add a filter flag for = FILTER_VALIDATE_URL, e.g. FILTER_FLAG_ALLOW_IDN. Of course, the ICU dependency should be optional :) >=20 > -- > Andrea Faulds > http://ajf.me/ >=20 >=20 >=20 >=20 >=20 > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20