WordPress.org

Ready to get started?Download WordPress

Forums

DIV ID's being stripped out (5 posts)

  1. Diesel12
    Member
    Posted 4 years ago #

    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!

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    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.

  3. Diesel12
    Member
    Posted 4 years ago #

    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.

  4. Diesel12
    Member
    Posted 4 years ago #

    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:
    http://svn.automattic.com/wordpress/trunk/wp-includes/kses.php
    for divs the id attribute is not allowed:
    'div' => array(
    'align' => array (),
    'class' => array (),
    'dir' => array (),
    'lang' => array(),
    'style' => array (),
    'xml:lang' => array()),

  5. tsmulugeta
    Member
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.