Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72214 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50463 invoked from network); 4 Feb 2014 21:22:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2014 21:22:29 -0000 Authentication-Results: pb1.pair.com header.from=padraic.brady@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=padraic.brady@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.172 as permitted sender) X-PHP-List-Original-Sender: padraic.brady@gmail.com X-Host-Fingerprint: 209.85.160.172 mail-yk0-f172.google.com Received: from [209.85.160.172] ([209.85.160.172:54789] helo=mail-yk0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/74-13782-51A51F25 for ; Tue, 04 Feb 2014 16:22:29 -0500 Received: by mail-yk0-f172.google.com with SMTP id 200so26045444ykr.3 for ; Tue, 04 Feb 2014 13:22:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ALIiXNqC9G0OuPk7Lu6gW9kMfJrcniWe/9JEMrxesU8=; b=UAR6KzWh1vetUTDBekGqk5uRJC9blEME4bBCY7IN5MBdRUEv67EsfB7odov4gnP0FW 1y6g3TKxzeAy3Hj7mRfE7IwDGQdanDuib9RCEMP228LzNLuQurKdybuH4HIhM5yQnclU NbjQaU9jGIXP/B/PLXHGexMrSqpZuyJg412s20Sqk3Ajzxkqas6mX90ch/ryjyQOS/oy nbRk/l/uIEwznhWr2zGS25XbQ6JMg6NkEUberWyHsn/NjPvMxoA/SmqsxGlAussBs7yC nZIeK2X8SjlF8Ug+IuwEvonrDjjm1+K5kh+KAJRiMx+SxZbs7Zj7npbU0kX1LWsXz+zV rdCA== MIME-Version: 1.0 X-Received: by 10.236.122.165 with SMTP id t25mr40104223yhh.46.1391548946645; Tue, 04 Feb 2014 13:22:26 -0800 (PST) Received: by 10.170.215.130 with HTTP; Tue, 4 Feb 2014 13:22:26 -0800 (PST) In-Reply-To: <52F10DE9.3040504@ajf.me> References: <52F10DE9.3040504@ajf.me> Date: Tue, 4 Feb 2014 21:22:26 +0000 Message-ID: To: Andrea Faulds Cc: Yasuo Ohgaki , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Improve HTML escape From: padraic.brady@gmail.com (=?UTF-8?Q?P=C3=A1draic_Brady?=) Hi, Doing a bit of due diligence, the reason the forward slash was added was to prevent any possibility of someone introducing a Javascript comment into an attribute. It's very sketchy, but the theory is that since html escaping won't escape /, using html escaping on a javascript attribute like onmouseover might allow the browser to interpret a comment, disregard the terminating quotes of an attribute, and then inject HTML. Personally, it seems a bit garbled - user input in a Javascript attribute should be escaped as a Javascript string literal with no input injected as actual Javascript code - so it would require both a severe browser parsing issue AND a lack of proper contextual escaping. Paddy