HTML Tags in Atom "feed/entry/summary"


How to enter HTML Tags in Atom "feed/entry/summary"?



In most cases, the "feed/entry/summary" XML element should contain a text string describing the Atom feed entry without HTML tags.

But sometimes, you would like to include HTML tags in the "feed/entry/summary" XML element, to provide images and hyper links in the Atom feed entry.

What you need to do is specify the type="html" attribute and code HTML tags as XML entities. For example, here is an Atom feed entry:

<feed xmlns="">
  <title>Use Developer Portal Internally</title>
  <link rel="alternate" 
  <summary type="html">&lt;img align='left' width='64' height='64' 
src='' /&gt;How to use 
the Developer Portal internally by you as the publisher? Normally, the 
Developer Portal of an Azure API Management Service is used by client 
developers. But as a publisher, you can also use the Developer Portal to 
test API operations internally. You can follow this tutorial to access the 
...  - Rank: 120; Updated: 2017-09-20 13:29:06 -> &lt;a 
  <category term="Microsoft"/>

As you can see, the "summary" element contains 2 HTML tags: <img ...> and <a ... >. But they have to be encoded as &lt;img ...&gt; and &lt;a ...&gt;.

When the above Atom feed entry is displayed in an Atom viewer, the encoded HTML tags will be respected as shown below:

HTML Tags in Atom feed/entry/summary
HTML Tags in Atom feed/entry/summary


DTD for Atom XML Files

Atom "feed/entry/summary" Element

Atom Specification - RFC 4287

⇑⇑ RSS FAQ and Tutorials

2018-01-06, 1877🔥, 0💬