Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64566 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19339 invoked from network); 5 Jan 2013 23:26:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2013 23:26:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.147 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.147 smtp147.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.147] ([67.192.241.147:57360] helo=smtp147.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1E/4A-62408-5B6B8E05 for ; Sat, 05 Jan 2013 18:26:45 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp31.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 63EE1503E1; Sat, 5 Jan 2013 18:26:43 -0500 (EST) X-Virus-Scanned: OK Received: by smtp31.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id EDFDD503C1; Sat, 5 Jan 2013 18:26:42 -0500 (EST) Message-ID: <50E8B6B2.1030404@sugarcrm.com> Date: Sat, 05 Jan 2013 15:26:42 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Adam Jon Richardson CC: "internals@lists.php.net" References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Providing improved functionality for escaping html (and other) output. From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > It's important to escape output according to context. PHP provides > functions such as htmlspecialchars() to escape output when the context > is HTML. However, one often desires to allow some subset of HTML > through without escaping (e.g.,
, , etc.) I think what you are looking for is HtmlPurifier and such. Doing it in the core properly would be pretty hard. > https://github.com/AdamJonR/nephtali-php-ext/blob/master/nephtali.c > Could you describe in detail what that function actually does, with examples? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227