abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@gmail.com>
Subject Re: Is this correct output for a HTML entry
Date Tue, 21 Aug 2007 15:53:39 GMT
Oh, right, yeah that's correct.  The > does not have to be escaped.
Different stax implementations will handle this differently; some will
escape the >, others will not.  Either way the output is correct.

- James

Takasho wrote:
> 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
View raw message