Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72149 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78217 invoked from network); 3 Feb 2014 22:27:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2014 22:27:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.47 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.47 mail-la0-f47.google.com Received: from [209.85.215.47] ([209.85.215.47:49157] helo=mail-la0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F6/AC-35654-2D710F25 for ; Mon, 03 Feb 2014 17:27:31 -0500 Received: by mail-la0-f47.google.com with SMTP id hr17so5809821lab.6 for ; Mon, 03 Feb 2014 14:27:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=khXgpuunjpJVh8bW+2Y/W+kuDpHAWLQcgUpWHRtYCak=; b=vAQOI8d0g8okrOqZEfZh98/LfKnXENTZnWFzamVnIFPpMoHitcihusa2XtMUpVThv4 Zih+rbJDk8iUyzJNmnXUVjIenoeTCeg09SuXv12p7lw9dQe6g3XQ046ao/VzyKmLXDTP zl3ZBrkrCZun1KtRTUDlXCcDKiB1FFdCTTc6gCcR0EOlu9ZvEmfym9Y/UHQfVxj3TAcu jaKH1sO4Ari/3+139bv/Ju5FgMwYFRxki6Ur1FT8J2lRYKd7c06KiFnswxPGKLXN7I/g t8QuzHSLXyOI3uA2bKsuLV7Vt5+KaGuosQuvHwxkU9UcsMCxEUIydWQrUqrz4MSUlwjI vgKg== X-Received: by 10.152.170.232 with SMTP id ap8mr3302963lac.40.1391466447680; Mon, 03 Feb 2014 14:27:27 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.199.37 with HTTP; Mon, 3 Feb 2014 14:26:47 -0800 (PST) In-Reply-To: <52F01654.6080903@sugarcrm.com> References: <52EDBB30.3070209@ajf.me> <52EE1C2B.7030702@sugarcrm.com> <52EF50B6.1030404@sugarcrm.com> <52F01654.6080903@sugarcrm.com> Date: Tue, 4 Feb 2014 07:26:47 +0900 X-Google-Sender-Auth: ZJmPuPlZynxpsLiS472IvhRr21g Message-ID: To: Stas Malyshev Cc: =?UTF-8?Q?P=C3=A1draic_Brady?= , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e0117769154b7b304f1880736 Subject: Re: [PHP-DEV] [RFC] Improve HTML escape From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e0117769154b7b304f1880736 Content-Type: text/plain; charset=UTF-8 Hi Stas, On Tue, Feb 4, 2014 at 7:21 AM, Stas Malyshev wrote: > > Use of this option is not recommended, but there is the standard. We may > > support it even if we don't recommend it. > > Nowhere in any standard it says we must use htmlentities to support > every possible context. There are contexts where htmlentities is > completely unsuitable - such as unquoted attributes, Javascript, CSS, > etc. In these contexts, other ways of escaping output should be used. > > I get an impression you're trying to fit a square peg into a round hole > here. There are other ways to escape things and they should match the > context the output is used in. Trying to serve every scenario with one > function would not work. We may or may not support unquoted attributes. I think it's really dangerous, therefore we my not support it ;) It may be good for PHP to declare "We support HTML5!", though. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e0117769154b7b304f1880736--