RSS 提要中的有效 HTML 标签是什么? [英] What are the valid HTML tags in RSS Feeds?
问题描述
我环顾四周,似乎没有关于 RSS 中允许"什么 HTML 标签的任何标准 - 您可以放入任何内容.但是我测试的阅读器只允许某些事情.
I've looked around, and it doesn't seem like there's any standard of what HTML tags are 'allowed' in RSS - you could put anything in. But the readers I tested only allow certain things.
在我最初的测试中,它看起来像 <b> 这样的简单样式标签.没事.像 <span style="color:red"> 这样的内联样式也是如此.<img> 的似乎工作.但是 <iframe> 和 <script> 都被忽略了.块.Onclick 属性不起作用.<风格>块在某些阅读器中有效,但在其他阅读器中无效
In my initial testing, it seems like simple styling tags like <b> are fine. So is inline styles like <span style="color:red"> <img>'s seems to work. But <iframe>'s are ignored, as are <script> blocks. Onclick attributes don't work. <style> blocks work in some readers but not others
是否有一个普遍的共识、标准或兼容性站点,列出了哪些读者支持和不支持哪些内容?我想知道我可以在提要中使用的 HTMl 标签子集是什么.
Is there a general consensus, standard, or compatability site listing what is and isn't supported in what readers? I want to know what the subset of HTMl tags I can use in feeds is.
推荐答案
<title>How to parse full html content in xml feeds</title>
<description><![CDATA[<html><body>Any code html is valid here like &npsb;
and what ever you want to transfer</body></html>]]></description>
<guid>http://example.com/your-news-id</guid>
这篇关于RSS 提要中的有效 HTML 标签是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!