Home Forums Bug Reports Script tags stripped from Text Area for Admin user


Script tags stripped from Text Area for Admin user

  • Hi there!

    This took me a little while to finally reproduce consistently. What’s going on is I have a place in my theme to add in Google Tag Manager embed code using an ACF Text Area field type. On a simple WordPress install this works exactly as expected. Admins are able to edit this and it retains the embed as is.

    However, if the site is a multi-site install (mine is setup as a subdomain install), then users with the role of Admin have the script tags stripped when they save the Options page. It does work as expected if the user is a Super Admin though.

    Has anyone else come across this? I’m aware I could use a plugin to add in GTM code (or other embed code), but I’m looking for a solution to script tags not being removed from Text Areas when you have a role of Admin in a multi-site install.


  • Yes.

    I started with this. I can’t say if I’ve made modifications to it or not, I may have had to in order to get it working but I can’t really remember

  • Thanks for the quick reply. Sorry that I thought it was a bug when it instead seams to be standard functionality in WordPress multi-sites to behave this way for security reasons.

    Thanks again!

  • Yes it is, and it is a PITA. The only multisites I have only trusted people are given admin access. It’s not like I run any sites where anyone can just create a site. This is something I have to dig into every time I set one up. It will block a lot more than just scripts as well. Any attribute that’s not recognized will also be stripped.

  • I’m having the same problem on a non-multi-site WordPress install. I guess WordPress has extended this annoying “feature” to all installations.

  • I’m not seeing this as an issue on non mutlisite installs for admins. Possibly an issue for Editor and below, but that I think is normal.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.