WordPress.org

Support

Support » Multisite » [Resolved] Disable javascript on widgets

[Resolved] 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

    @catacaustic

    very awesome

    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.

    By default, no one but the super admin can insert iframes or embed or (I THOUGHT) JS.

    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 ‘[Resolved] Disable javascript on widgets’ is closed to new replies.
Skip to toolbar