Support » Fixing WordPress » DIV ID’s being stripped out

  • We have users (administrators) that have pages that are breaking when they save them. It turns out that DIV ID’s are being stripped out when they save, this is happens in visual or html mode and whether or not they switch back and forth from visual to html. This also occurs with revisions, they are unable to restore older working versions of the page because those too will have the Div’s stripped out.

    As a super admin this does not occur for me, but when I create a new administrator for an account I can reproduce the error, so it is clearly related to permissions, it does not affect super admins…. this occurs even with visual editing disabled, so definitely not related to switching back and forth from visual to html.

    Has anyone else experienced this? Anyone have any ideas?

    Any feedback appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi


    Forum Moderator

    Switching from VISUAL to HTML and back again can cause unpredictable results. The Visual Editor can (and often will) strip out HTML markup. Ideally, users should choose 1 tab and then stick to it.

    I’ve updated my original post as I found out that it is permissions based, it is a little more clear now. I’ve confirmed the issue is not related to switching between visual (still occurs with visual editing disabled) and html and even occurs when they restore a previous working revision, the tags are still stripped out. Occurs with anyone that is not a super admin.

    Looks like MU Unfiltered isn’t working in 3.0 causing this issue for us, but I’m being told that ID’s have always been stripped from WP anyways, from another forum, fwiw:

    I meant ids actually. You can see the default array here:
    for divs the id attribute is not allowed:
    ‘div’ => array(
    ‘align’ => array (),
    ‘class’ => array (),
    ‘dir’ => array (),
    ‘lang’ => array(),
    ‘style’ => array (),
    ‘xml:lang’ => array()),

    Hi Diesel12. I am having the same problem. Can you tell me what you did to fix this? Thanks in advance!!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘DIV ID’s being stripped out’ is closed to new replies.