# 帖子内自定义内容的不同方法是什么（自定义属性等）

**URL:** <https://meta.discourse.org/t/what-are-the-different-ways-to-customize-content-inside-a-post-custom-attributes-and-such/226747>\
**Category:** Support\
**Created:** [2022年五月11日 11:10 UTC](https://meta.discourse.org/t/what-are-the-different-ways-to-customize-content-inside-a-post-custom-attributes-and-such/226747 "2022-05-11T11:10:01Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2022年五月17日 22:05 UTC](https://meta.discourse.org/t/what-are-the-different-ways-to-customize-content-inside-a-post-custom-attributes-and-such/226747/7 "2022-05-17T22:05:41Z")

</div>

> [@SaraDev](#):
>
> ~~我确信它看起来会像这样：[Discourse HTML Whitelist](https://github.com/pnewell/discourse-html-whitelist)~~

该代码不再有效。最好将其从您的帖子中删除。

正如 @canapin 已经发现的那样，[答案就在链接的主题中](https://meta.discourse.org/t/whitelisting-html-tags-attributes/159653/5)。

请注意，`whiteList()` 函数已被弃用，如今它被称为 `allowList()` [调用](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js#L39)。

---

_[View the full topic](https://meta.discourse.org/t/what-are-the-different-ways-to-customize-content-inside-a-post-custom-attributes-and-such/226747)._
