Re: [PHP Template] A suggestion
| From: | Dan Libby | Date: | Wed, 01 Mar 2000 00:16:16 +0000 |
| Subject: | Re: [PHP Template] A suggestion | ||
| References: | 1 2 3 4 | Groups: | php.template |
| Request: | Send a blank email to php-template+get-259@lists.php.net to get a copy of this message | ||
Andrei Zmievski wrote:
> On Mon, 28 Feb 2000, Dan Libby wrote:
> > html escaping should work for XML also, so long as it uses character entities.
> > For plain ascii, why would they want to escape? Anyway, the attribute should
> > probably be called "htmlescape" instead of escape. Actually, more useful would
> > be
> > escape="html|xml|url", and equivalent unescape="html|xml|url". There
> > are
> > probably some other escape types that would be good too.
>
> Yeah, that was my question, is there a difference between HTML and XML
> escaping?
Not to my knowledge. It is possible that some html escaping routines might use ©
et al instead of the ordinal value, which would not work for xml. But I don't know
about the PHP routines.
> URL escaping might be good, but I have to ask, should it really be done
> in the template or in the script?
It is a common enough requirement that I think designers may need to do it on a
semi-regular basis. Further, it is a more general escaping mechanism than html escape,
which doesn't escape newlines, tabs, etc that people often need escaped.
-dan