[XML-SIG] Unwanted behavior in PrettyPrint: > doesn't round-trip

tpassin at comcast.net tpassin at comcast.net
Wed Jul 7 23:08:01 CEST 2004


Morten Liebach wrote -

> > On 2004-07-06 13:16:47 -0600, Mike Brown wrote:
> > There are no browsers that will have a problem with an unescaped ">".
> > 
> > This is one of those situations where paranoia about web browser behavior is 
> > not supported by reality, much like when people freak out about putting 
> > "&" in an href.
> 
> Probably true in this case, as the output, judging from the example, is
> going to be valid XML or XHTML of some sort.
> 
> If the output is not valid and the browser spot this it goes into
> tagsoup parsing mode, and nobody know what that means, it's not defined
> by any standards or docs.  Then it might help to escape '>', otherwise
> not.

But the ">" never *has* to be escaped in xml (except in cdata sections if it appears as part of "]]>" that is actually character data).

Only a pretty old browser would have problems with ">".  The HTML 54.01 Rec says this -

"Similarly, authors should use ">" (ASCII decimal 62) in text instead of ">" to avoid problems with older user agents that incorrectly perceive this as the end of a tag (tag close delimiter) when it appears in quoted attribute values."

Like Mike says, this is a non-issue in practice.

Cheers,

Tom P





More information about the XML-SIG mailing list