# wp-discourse 帖子中多行 HTML 注释未隐藏

**URL:** <https://meta.discourse.org/t/multi-line-html-comments-not-hidden-on-post-from-wp-discourse/157177>\
**Category:** Product Support\
**Created:** [2020 年7 月 8 日 18:51 UTC](https://meta.discourse.org/t/multi-line-html-comments-not-hidden-on-post-from-wp-discourse/157177 "2020-07-08T18:51:28Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

作者： ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
发布日期： [2020 年7 月 9 日 23:00 UTC](https://meta.discourse.org/t/multi-line-html-comments-not-hidden-on-post-from-wp-discourse/157177/5 "2020-07-09T23:00:43Z")

</div>

> [@orenwolf](#):
>
> 如果评论中的 HTML 实体导致 Discourse 判定该评论为无效 HTML，这听起来像是一个更大的问题，不是吗？

我不确定 Discourse 应如何处理这种情况。我认为，对于直接在 Discourse 上创建的帖子，说明仅支持有限的 HTML 子集是合理的；但对于通过 API 创建的帖子，或通过拉取 RSS 源导入的帖子，Discourse 应在多大程度上支持 HTML，目前还不太清楚。

我认为将我在上面发布的代码直接添加到 [WP Discourse](https://github.com/discourse/wp-discourse) 插件中是合理的。该插件已经使用类似的功能来清理从 Discourse 同步到 WordPress 的评论。这一功能已使用了一段时间，至今未收到任何问题的报告。我会在接下来的几天内再向您反馈此事。

---

_[View the full topic](https://meta.discourse.org/t/multi-line-html-comments-not-hidden-on-post-from-wp-discourse/157177)._
