gpt4 book ai didi

rss - RSS 描述项的最大长度

转载 作者:行者123 更新时间:2023-12-02 14:25:49 38 4
gpt4 key购买 nike

RSS 项目内的描述标签是否有长度限制或最大大小?

此外,此标记是否可以容纳 HTML 标记?

我将生成 <description><content:encoded>来自同一源 HTML,还想知道 <description> 是否标签容纳 HTML。

最佳答案

据我所知,没有长度限制。 2

In RSS 0.91, various elements are restricted to 500 or 100 characters. There can be no more than 15 < item >s in a 0.91 < channel >. There are no string-length or XML-level limits in RSS 0.92 and greater. Processors may impose their own limits, and generators may have preferences that say no more than a certain number of < item >s can appear in a channel, or that strings are limited in length.

Rss 2.0

For all elements defined in the RSS specification that enclosecharacter data, the text should be interpreted as plain text with theexception of an item's description element, which must be suitable forpresentation as HTML. All of these elements must not contain childelements.

There's no limit on the length of character data that can be contained in an RSS element.

那么您想在某处剪切文本并添加...吗?在这种情况下,只需使用 substr。

$description = substr($description, 0, 250)."...";

将 250 替换为您想要的大小。

关于rss - RSS 描述项的最大长度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8710676/

38 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com