Support » Networking WordPress » Disable javascript on widgets

  • Resolved seanbee

    (@seanbee)


    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.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

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