DIYgod / RSSHub

🧡 Everything is RSSible
https://docs.rsshub.app
MIT License
34.01k stars 7.59k forks source link

EPIC免费游戏 item.description中的img标签不闭合 #15459

Closed firstmeet1108 closed 1 month ago

firstmeet1108 commented 7 months ago

路由地址

/epicgames/freegames/:locale?/:country?

完整路由地址

/epicgames/freegames/zh-CN

相关文档

https://docs.rsshub.app/zh/routes/game#epic-games-store

预期是什么?

item.description中的img标签可以自闭合

例如: 希望为 <img src="..." /> 而非 <img src="..." >

实际发生了什么?

表现

image

其中 item.description 中的 img标签为<img src="https://cdn1.epicgames.com/spt-assets/af503dd7e8b64218b69c22a9003de268/orcs-must-die-3-1puow.jpg" referrerpolicy="no-referrer">,未自闭合。

部署

RSSHub 演示 (https://rsshub.app)

部署相关信息

No response

额外信息

这不是重复的 issue

github-actions[bot] commented 7 months ago
Searching for maintainers:

To maintainers: if you are not willing to be disturbed, list your username in scripts/workflow/test-issue/call-maintainer.js. In this way, your username will be wrapped in an inline code block when tagged so you will not be notified.

If all routes can not be found, the issue will be closed automatically. Please use NOROUTE for a route-irrelevant issue or leave a comment if it is a mistake. 如果所有路由都无法匹配,issue 将会被自动关闭。如果 issue 和路由无关,请使用 NOROUTE 关键词,或者留下评论。我们会重新审核。

JimenezLi commented 6 months ago

img 标签不闭合是存在兼容性问题吗 description 里面的标签符号都处理成了 &lt;&gt;,不算 XML 标签

Candinya commented 5 months ago

img 标签末尾的闭合斜杠是可选的,可以参见 HTML 的 spec:

  1. Then, if the element is one of the void elements, or if the element is a foreign element, then there may be a single U+002F SOLIDUS character (/), which on foreign elements marks the start tag as self-closing.

如果解析器不支持非闭合的 img 标签,那是解析器有兼容性问题,可以使用预处理工具格式化或更换兼容性更完整的解析器。