Re: [RFC] Improve HTML escape
| From: | Sara Golemon | Date: | Sun, 02 Feb 2014 03:35:46 +0000 |
| Subject: | Re: [RFC] Improve HTML escape | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-71973@lists.php.net to get a copy of this message | ||
On Sat, Feb 1, 2014 at 7:31 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
> They don't explain as code. AFAIK This is the case for generating invalid
> HTML that destroys HTML tag structure.
>
> <tag attr=<?php htmlentities($str, ENT_QUOTES, 'UTF-8') ?>>
>
> When $str is
>
> sometext /
>
> Produced HTML would be
>
> <tag attr=sometext />
>
> and tag is closed.
>
Oh, I see what the RFC is suggesting now: Include encoding '/' by
default. Yeah, I got no problem with that. Seems completely
reasonable. ((Though I twitch every time I see unquoted attributes))
-Sara