# Whitelisting HTML tags

**URL:** <https://meta.discourse.org/t/whitelisting-html-tags/225962>\
**Category:** Support\
**Created:** [May 3, 2022, 7:56am UTC](https://meta.discourse.org/t/whitelisting-html-tags/225962 "2022-05-03T07:56:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yaxu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yaxu/32/178942_2.png) [@yaxu](https://meta.discourse.org/u/yaxu)\
**Post date:** [May 3, 2022, 7:56am UTC](https://meta.discourse.org/t/whitelisting-html-tags/225962/1 "2022-05-03T07:56:03Z")

</div>

I’d like to embed a musical REPL (i.e., the musical live coding editor here: [https://strudel.tidalcycles.org/](https://strudel.tidalcycles.org/)) in my discourse forum.

This is a case of including a [little bit of javascript](https://unpkg.com/@strudel.cycles/embed@latest) and whitelisting a html tag `strudel-repl`. I’m struggling with the latter.

I found [this thread](https://meta.discourse.org/t/whitelisting-html-tags-attributes/159653), which (digging into git history) points at [this line](https://github.com/discourse/discourse-policy/blob/f7a06fb2e0c0aa58e9dc7286d912d52c2a4f6560/assets/javascripts/lib/discourse-markdown/policy.js.es6#L43).

Searching for `helper.whiteList` turns up a lot of old examples, but I somehow couldn’t find a clear example for using it in a simple plugin.

Does someone have some pointers for how to whitelist html tags?

---

<div class="post-metadata">

**Author:** ![yaxu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yaxu/32/178942_2.png) [@yaxu](https://meta.discourse.org/u/yaxu)\
**Post date:** [May 3, 2022, 8:50am UTC](https://meta.discourse.org/t/whitelisting-html-tags/225962/2 "2022-05-03T08:50:02Z")

</div>

Pardon me for the noise, a bit more searching and I found this recent plugin that looks like a perfect example for what I’m trying to do:  
[GitHub - unfoldingWord/discourse-mermaid: Adds the Mermaid JS library to discourse · GitHub](https://github.com/unfoldingWord-dev/discourse-mermaid)

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [May 3, 2022, 10:50am UTC](https://meta.discourse.org/t/whitelisting-html-tags/225962/3 "2022-05-03T10:50:28Z")

</div>

I remember the `<mark>` tag being whitelisted a while back:

> [@Whitelist \<mark\> tags](https://meta.discourse.org/t/whitelist-mark-tags/179256/12):
>
> Done via: [https://github.com/discourse/discourse/commit/85c4e8fd32fdf61a2987c2b181661bbd7d203913](https://github.com/discourse/discourse/commit/85c4e8fd32fdf61a2987c2b181661bbd7d203913) This text is \<mark\>highlighted\</mark\>. This text is highlighted.

Hopefully, that can give you some hints or clues while you wait for some more knowledgeable replies. 🤞🙂

---

<div class="post-metadata">

**Author:** ![yaxu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yaxu/32/178942_2.png) [@yaxu](https://meta.discourse.org/u/yaxu)\
**Post date:** [May 3, 2022, 12:36pm UTC](https://meta.discourse.org/t/whitelisting-html-tags/225962/4 "2022-05-03T12:36:35Z")

</div>

Thanks, I accepted my own answer for now 🙂

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [June 2, 2022, 12:36pm UTC](https://meta.discourse.org/t/whitelisting-html-tags/225962/5 "2022-06-02T12:36:41Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
