Re: Providing improved functionality for escaping html (and other) output.
| From: | Stas Malyshev | Date: | Sat, 05 Jan 2013 23:26:42 +0000 |
| Subject: | Re: Providing improved functionality for escaping html (and other) output. | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-64566@lists.php.net to get a copy of this message | ||
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., <br />, <b></b>, 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