I now develop websites and XML interfaces since 7 years, and never, ever came in a situation, where it was really necessary to use the >
for a >
. All disambiguition could so far be handled by quoting <
, &
, "
and '
alone.
Has anyone ever been in a situation (related to, e.g., SGML processing, browser issues, XSLT, ...) where you found it indespensable to escape the greater-than sign with >
?
Update: I just checked with the XML spec, where it says, for example, about character data in section 2.4:
Character Data
[14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
So even there, the >
isn't mentioned as something special, except from the ending sequence of a CDATA section.
This one single case, where the >
is of any significance, would be the ending of a CDATA section, ]]>
, but then again, if you'd quote it, the quote (i.e., the literal string ]]>
) would land literally in the output (since it's CDATA).
<
' than anything else. – Loyalvar test = 'I'll tell';
) This is the same thing. – Silly<
correctly, can you name use cases, where the quoting of>
is necessary to prevent HTML injection? About XHTML compliance: I checked the XML spec, and they don't say a word about>
being any more special than any letter or so. – Pleader