Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72143 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69824 invoked from network); 3 Feb 2014 22:16:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2014 22:16:15 -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.41 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.41 mail-la0-f41.google.com Received: from [209.85.215.41] ([209.85.215.41:43366] helo=mail-la0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5A/AA-35654-E2510F25 for ; Mon, 03 Feb 2014 17:16:15 -0500 Received: by mail-la0-f41.google.com with SMTP id mc6so5908987lab.14 for ; Mon, 03 Feb 2014 14:16:11 -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=OOlhOyFORLqCQP8vt+XdRZEbO5Kced520VheMmaiyUE=; b=t3pPn4tx+qfFFNhT56F/jSFGbvNM3L+8gNU0nI4PhLnM64jxyqy3dZNlmI74JtbabO awZRIm/5sG3AHjaNE+N99/ST0Lxr+PDat5FEGuHLuF7z+gX0hHo03vpXwZT8rF4twalZ N+6iu1VAV3hh/WUXuUlDSs9M9sAYK7bQNQVx1e1EHHdR/l3jCeJYaZlwpM7hBOQ2fWWa ThxtKL810J7THiff6NN5QyogFCG9uEDsSBnc415ZyBL0EQI+3x14kHU5qaQZMfLdq3xM mTvr0uyvhPzs03VNDQpSbDKjIXnXFxGjwT4EzfsQy70NyaT86UwomG98r7pw3f7+/I3r 6gZw== X-Received: by 10.152.8.47 with SMTP id o15mr15231462laa.20.1391465771502; Mon, 03 Feb 2014 14:16:11 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.199.37 with HTTP; Mon, 3 Feb 2014 14:15:31 -0800 (PST) In-Reply-To: References: <52EDBB30.3070209@ajf.me> <52EE1C2B.7030702@sugarcrm.com> <52EF50B6.1030404@sugarcrm.com> Date: Tue, 4 Feb 2014 07:15:31 +0900 X-Google-Sender-Auth: G2SPeSC-PHaUfOBYLEuJWSZpAxU Message-ID: To: =?UTF-8?Q?P=C3=A1draic_Brady?= Cc: Stas Malyshev , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c36402070ed604f187df70 Subject: Re: [PHP-DEV] [RFC] Improve HTML escape From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c36402070ed604f187df70 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Padraic, On Mon, Feb 3, 2014 at 8:06 PM, P=C3=A1draic Brady wrote: > There are three ways to present an attribute value validly in HTML5: > > 1. Double quoted > 2. Single quoted > 3. Unquoted. > Unquoted is really bad standard with respect to security. I don't understand why they allow unquoted attributes, but I think we need to address this some how. htmlentities/htmlspecialchars may have ENT_NO_SPACE as an option. If there is space char, null string is returned. Standard allows space before attributes. User may write > Use of this option is not recommended, but there is the standard. We may support it even if we don't recommend it. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c36402070ed604f187df70--