Title: Suggestion: sanitize forms for Javascript content
Last modified: August 30, 2016

---

# Suggestion: sanitize forms for Javascript content

 *  [Henrique Vianna](https://wordpress.org/support/users/hvianna/)
 * (@hvianna)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/suggestion-sanitize-forms-for-javascript-content/)
 * I run a multisite installation at my University and one of our users managed 
   to do a lot of “customizations” to their site by adding jQuery code in a contact
   form. Although really clever, this could cause a lot of trouble (break site/plugin
   functionality due to js errors, allow untrusted users to insert malicious code,
   etc..)
 * I would like to suggest that CF7 sanitizes form templates to remove javascript
   content before saving them to the database. If the author sees fit, I believe
   the `unfiltered_html` user capability could be used to allow only the super-admin(
   in multisite) or the admin (in standalone installation) to save javascript content
   in the forms.
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

The topic ‘Suggestion: sanitize forms for Javascript content’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [sanitization](https://wordpress.org/support/topic-tag/sanitization/)
 * [unfiltered html](https://wordpress.org/support/topic-tag/unfiltered-html/)

 * 0 replies
 * 1 participant
 * Last reply from: [Henrique Vianna](https://wordpress.org/support/users/hvianna/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/suggestion-sanitize-forms-for-javascript-content/)
 * Status: not resolved