Re: XML Entities in assertions

"Benjamin D. Smedberg" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.rdf
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
Neil Stansbury wrote:
> Hi All,
> 
> I just wondered if anyone could clarify how best to handle the following:
> 
> <rdf:li rdf:resource="http://host.domain.com/b&b/page.php?ab=1&cd=2"/>
> 
> There are two entities in that URI one that must be escaped and one that 
> mustn't, and they both have to be escaped when in an RDF statement.

I don't understand. Both ampersands should be escaped, because they are 
in XML:

http://host.domain.com/b&amp;b/page.php?ab=1&amp;cd=2

> Is there an xpcom mechanism for handling/unescaping entities in URI's?

Take a look at nsEscape.h

--BDS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.