The MU forums have moved to WordPress.org

Why is Wordpress stripping my CSS? (8 posts)

  1. delayedinsanity
    Member
    Posted 13 years ago #

    I originally posted this over at wordpress.org but I'm not getting any response, and the more I think about it the more I'm wondering if it isn't MU specific in nature....

    Here's the original question:

    Why is Wordpress stripping things that I'm trying to add via the page editor? I was in the middle of doing some temporary layout adjustments to a page, to see how it should look were I to make the changes permanent and every time I try to add a style attribute to my LI tags, Wordpress is stripping them.

    I use the HTML editor because I've never been fond of how visual editors massacre markup. Editing the source, NOTHING should be changed from what I put in there, so why is it arbitrarily stripping things?

    Is there a plug I can pull somewhere so that it lets me put in markup exactly as I see fit, and it will not disturb it?

    I'm assuming that it's MU's way of keeping people with blogs from messing up their themes style sheets or injecting malicious code, but I'm the site admin and it's a pain in the arse that it does it to me too!

    Can anybody confirm or deny why this is occurring and if it's confirmed maybe point me in the right direction in the codebase to find it? Also, if it is confirmed that it's the MU wrapper doing this for security purposes, it'd be nice if future versions came with an on/off switch for the site admin. ;)

  2. expat
    Member
    Posted 13 years ago #

    refresh your browser? clear cache?

    as a matter of fact dont cache your page during development

  3. andrea_r
    Moderator
    Posted 13 years ago #

    Yes, it's WPMU. It does strip extra css tags, even for site admins. The fiel that you can specify extra tags is caled kses.php.

    There's a plugin to override this called Unfiltered MU (it's in the official repo), but if you want it site admin only, you'll have to edit the plugin.

  4. delayedinsanity
    Member
    Posted 13 years ago #

    Thanks andrea. It'd definitely be nice to see this as part of future releases as perhaps a toggle or even a given for the site admin blog. I totally understand the necessity for it under user blogs, but it was definitely a thorn in my side discovering it on my own haha. :)

  5. cafespain
    Member
    Posted 13 years ago #

    There are some filters in the code to check if a user can post unmodified html. I haven't got the code loaded, so can't check at the moment, so I always assumed there would be a way to set this capability on a user.

    Never really looked into it further because of that.

  6. andrea_r
    Moderator
    Posted 13 years ago #

    With the merge, I can see it as a site admin only function. Not sure they got that far yet. :)

    The only way we've done it on a per-user basis before was a hack. Ron whipped up a nifty checkbox on the blog options page. :D That was a while ago, so there may be a hookable way to do this via plugin on a per user basis.

  7. delayedinsanity
    Member
    Posted 13 years ago #

    @andrea_r, I'm getting near the point where I'm going to start writing some of my own hacks do get things done the way I'd like them to be done - in the meantime I'm trying to see how far I can get with whats available to reduce the initial work load involved in getting this project off the ground.

    Much appreciated for all the help from everybody. :)

  8. delayedinsanity
    Member
    Posted 13 years ago #

    One last *bump* by adding a reference to http://wordpress.org/extend/ideas/topic.php?id=437 <-- Please WP developers. Please.

About this Topic

  • Started 13 years ago by delayedinsanity
  • Latest reply from delayedinsanity