W3C home > Mailing lists > Public > www-html@w3.org > November 2003

Re: XML in textarea problem

From: Andrew Clover <and-w3@doxdesk.com>
Date: Tue, 4 Nov 2003 13:52:03 +0000
To: www-html@w3.org
Message-ID: <20031104135203.GA14089@doxdesk.com>

Lachlan Hunt <lhunt07@postoffice.csu.edu.au> wrote:

> You should also encode the > character as &gt; to be correct.

Not necessarily. '>' is not in itself is an out-of-band character in content
or attribute values. It is only special as part of the sequence ']]>'.

This acts as an ending for CDATA sections. For obscure and uninteresting
reasons, the sequence ']]>' should not be included in content; certainly,
escaping all >s to &gt;s is one way to avoid this.

> The four entities defined in xml (&lt; &gt; &amp; and &quot;) should always
> be used

There's another predefined entity, too, &apos;. Neither " nor ' have to be
written as entity references in normal usage; it's only in attributes
where one or the other has been used as a delimiter that this becomes

Andrew Clover
Received on Tuesday, 4 November 2003 09:08:47 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:06 UTC