RSS specification HTML code inside RSS feed

后端 未结 2 1949
后悔当初
后悔当初 2021-02-05 01:22

Is HTML code inside the tag compliant in RSS 2.0?

相关标签:
2条回答
  • 2021-02-05 02:04

    You can decode < and > char to html code

    < : &lt;

    > : &gt;

    0 讨论(0)
  • 2021-02-05 02:21

    The RSS 2.0 specification says that you can include HTML in the description element so long as you properly encode the markup.

    You have two ways to do this:

    1. Convert tags to escaped HTML entities:

      <description>this is &lt;b&gt;bold&lt;/b&gt;</description>
      
    2. Wrap the description content within a CDATA section:

      <description><![CDATA[this is <b>bold</b>]]></description>
      
    0 讨论(0)
提交回复
热议问题