Title: Disable javascript on widgets
Last modified: August 21, 2016

---

# Disable javascript on widgets

 *  Resolved [seanbee](https://wordpress.org/support/users/seanbee/)
 * (@seanbee)
 * [13 years ago](https://wordpress.org/support/topic/disable-javascript-on-widgets/)
 * I recently installed a wp multisite, i want to know if it is possible to disable
   users from adding javascript snippets such as adsense or any other in to widgets
   from their user areas?
 * Similar to wordpress.com

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [13 years ago](https://wordpress.org/support/topic/disable-javascript-on-widgets/#post-4003133)
 * I don’t know of any direct ways to do it, but that’s only after a very quick 
   search so there might be something hidden deep down in the source code that I’ve
   missed.
 * If I had to do this, I’d do it by wrapping the calls to `get_sidebar()` in a 
   call to `strip_tags()` and passing in the allowed tags like p, li, ul, etc. It’s
   a bit of a hacky work-around, but it’s able to be done that way.
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [13 years ago](https://wordpress.org/support/topic/disable-javascript-on-widgets/#post-4003214)
 * By default, no one but the super admin can insert iframes or embed or (I THOUGHT)
   JS.
 *  Thread Starter [seanbee](https://wordpress.org/support/users/seanbee/)
 * (@seanbee)
 * [13 years ago](https://wordpress.org/support/topic/disable-javascript-on-widgets/#post-4003264)
 * > By default, no one but the super admin can insert iframes or embed or (I THOUGHT)
   > JS.
 * Yes that is the case it seems. Thank You.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Disable javascript on widgets’ is closed to new replies.

## Tags

 * [multisite](https://wordpress.org/support/topic-tag/multisite/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 3 replies
 * 3 participants
 * Last reply from: [seanbee](https://wordpress.org/support/users/seanbee/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/disable-javascript-on-widgets/#post-4003264)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
