# Asciinema embedding

**URL:** https://meta.discourse.org/t/asciinema-embedding/20786
**Category:** Feature
**Created:** [2014年十月5日 06:20 UTC](https://meta.discourse.org/t/asciinema-embedding/20786 "2014-10-05T06:20:45Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [2014年十二月24日 18:34 UTC](https://meta.discourse.org/t/asciinema-embedding/20786/12 "2014-12-24T18:34:32Z")

</div>

Well, the sanitization would look like this:

```js
Discourse.Markdown.whiteListTag('script', 'type', 'text/javascript');
Discourse.Markdown.whiteListTag('script', 'src', /https:\/\/asciinema.org\/a\/\d+.js/);
Discourse.Markdown.whiteListTag('script', 'async');

```

Then you just need to write Ruby onebox code to generate that script tag.

---

_[View the full topic](https://meta.discourse.org/t/asciinema-embedding/20786)._
