Re: htmlentities()
- From: "Rik Wasmus" <luiheidsgoeroe@xxxxxxxxxxx>
- Date: Thu, 28 Feb 2008 15:59:49 +0100
On Thu, 28 Feb 2008 15:51:23 +0100, Jerry <Jerry@xxxxxxxxxx> wrote:
The manual says that the default parameter is:
ENT_COMPAT - Will convert double-quotes and leave single-quotes alone.
Why is that the default and not:
ENT_QUOTES - Will convert both double and single quotes.
Because by default, most people use double quotes for their tag attributes rather then single quotes (which are just as valid offcourse). In most circumstances, you don't want both (for instance, setting an onclick attribute on a tag in double quotes: you want the double quotes as entities, converting the single quotes will usually end up destroying the javascript in there.
Also, what does 'ENT' refer to here? Thanks.
ENTities
--
Rik Wasmus
.
- Follow-Ups:
- Re: htmlentities()
- From: Toby A Inkster
- Re: htmlentities()
- References:
- htmlentities()
- From: Jerry
- htmlentities()
- Prev by Date: htmlentities()
- Next by Date: Re: ISSET() question
- Previous by thread: htmlentities()
- Next by thread: Re: htmlentities()
- Index(es):
Relevant Pages
|