abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Takasho <taka...@gmail.com>
Subject Re: Is this correct output for a HTML entry
Date Tue, 21 Aug 2007 14:32:15 GMT
Hi James,

I agree that it must be escaped as per the spec. I was questioning that
abdera is only partially escaping the HTML. e.g.

<content type="text/html">&lt;html>&lt;head/>&lt;body>&lt;p>This
is a full
HTML> document&lt;/p>&lt;/body>&lt;/html></content>

Instead of:

<content type="text/html">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This
is a full HTML&gt; document&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;></content>

Takasho

On 21/08/07, James M Snell <jasnell@gmail.com> wrote:
>
> Yes, that is the correct output.  The Atom spec states that HTML MUST be
> escaped.
>
> - James
>
> Takasho wrote:
> > Hi All,
> >
> > I'm just starting to use abdera and so at the moment my questions will
> be
> > very basic :)
> >
> > Is this the correct output from creating a HTML entry:
> >
> > ---code---
> >
> > Entry entryHTML = factory.newEntry();
> > entryHTML.setId("http://supersmashing.co.uk/elmer/entryHtml");
> > entryHTML.setUpdated(new java.util.Date());
> > entryHTML.setTitle("Shiny HTML Entry");
> > entryHTML.setContent("<html><head/><body><p>This is a full
HTML
> > document</p></body></html>", "text/html" );
> > entryHTML.addAuthor("Takasho");
> > entryHTML.addLink("http://www.supersmashing.co.uk");
> > feed.addEntry(entryHTML);
> >
> > ---output---
> >
> > <entry><id>http://supersmashing.co.uk/what/entryHtml
> > </id><updated>2007-08-21T13:51:32.980Z</updated><title type="text">Shiny
> > HTML Entry</title><content
> > type="text/html">&lt;html>&lt;head/>&lt;body>&lt;p>This
is a full HTML
> >
> document&lt;/p>&lt;/body>&lt;/html></content><author><name>Takasho</name></author><link
> > href="http://www.supersmashing.co.uk" /></entry>
> >
> > Its the encoding of the HTML is was not sure about as it is only
> encoding
> > the less than signs and not the greater than signs. I'm using the latest
> > trunk build as of this morning.
> >
> > Takasho
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message