# Guidance whitelisting arbitrary HTML attributes?

**URL:** <https://meta.discourse.org/t/guidance-whitelisting-arbitrary-html-attributes/123469>\
**Category:** Support\
**Created:** [July 19, 2019, 9:04pm UTC](https://meta.discourse.org/t/guidance-whitelisting-arbitrary-html-attributes/123469 "2019-07-19T21:04:54Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![lcestou](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lcestou/32/148373_2.png) [@lcestou](https://meta.discourse.org/u/lcestou)\
**Post date:** [July 19, 2019, 9:04pm UTC](https://meta.discourse.org/t/guidance-whitelisting-arbitrary-html-attributes/123469/1 "2019-07-19T21:04:54Z")

</div>

Apparently there used to be a topic here at meta where it would help guide you how to inject scripts but it has been removed.

At first I did not know that markdown would strip id and classes from posts in html and right after that I found out scripts have to be executed differently.

I am trying to make this codepen example work inside the discourse site but not sure where to begin as it does not work the usual way of copy/paste obviously:  
https://codepen.io/luiscestou/embed/preview/bPPzLy?default-tabs=css%2Cresult&height=300&host=https%3A%2F%2Fcodepen.io&slug-hash=bPPzLy

I understand that I can only put the scripts from the admin side, which I did but I believe there is more work to do to make it work inside the topics.

Basically these external scripts get triggered to inject content into a div that has certain data attributes.

Do I have to rewrite the whole external scripts with jquery and ember to inject the divs with content? I am hoping not having to reinvent the wheel.

Thanks in advance,

---

_[View the full topic](https://meta.discourse.org/t/guidance-whitelisting-arbitrary-html-attributes/123469)._
