<p>You probably need to set the Redactor <a href="http://imperavi.com/redactor/docs/settings/#set-allowedTags" rel="nofollow">allowedTags</a> config setting to allow <code>&lt;script&gt;</code> tags.</p>

<p>You can see how to define custom Redactor configs in Craft <a href="http://buildwithcraft.com/docs/rich-text-fields#redactor-configs" rel="nofollow">here</a>.</p>

CC BY-SA 3.0
2014-09-19T21:19:20.900Z
Still had some issues if I turned to code view...ended up just putting embed in template.  Thanks for the help.
frshjb373
CC BY-SA 3.0
2014-09-19T20:12:16.373Z
2014-09-19T20:12:16.373Z
Brad Bell
<p>I'm trying to add some embed code/script and the rich text field on save puts misc <code>&lt;p&gt;</code> tags around my code. </p>

<p>How do I save code so it keeps it's code formatting without adding an extra stuff?</p>

<field><richtext>
Rich Text Field Adding Tags around script
# Rich Text Field Adding Tags around script

(Asked by: username_0 on 2014-09-19)

I'm trying to add some embed code/script and the rich text field on save puts misc  tags around my code.

How do I save code so it keeps it's code formatting without adding an extra stuff?

**Tags:** field, richtext


---

## 1 answers

### Answer by username_1 on 2014-09-19. Score: 1

You probably need to set the Redactor [allowedTags](http://imperavi.com/redactor/docs/settings/#set-allowedTags) config setting to allow

> **Comments:**
> **username_0**: Still had some issues if I turned to code view...ended up just putting embed in template.  Thanks for the help.  

---

