WordPress.org

Ready to get started?Download WordPress

Forums

Editor munging ordered and unordered HTML lists (6 posts)

  1. incursio
    Member
    Posted 8 years ago #

    Repeatable using 2.0 gold.

    1) Create a blank document.
    2) Start a bullet level (or numeric list), type some text
    3) On the next bullet, tab to indent, add some more
    4) repeat a few times adding various levels of bullets
    5) Save
    6) Enjoy the munging and mangling :)

    The nesting levels get all screwed up.

    Cheers.

  2. DGrady
    Member
    Posted 8 years ago #

    Let's talk about this problem some more. I've been having the same issue, haven't been able to find any comments on it. If you use the WYSIWYG editor in 2.0 to create nested lists, WordPress does not appear to be correctly generating the code. What's more, if you manually correct the code and then save, WordPress seems to be breaking it again. Are we overlooking something simple, or is this a larger problem?

  3. DGrady
    Member
    Posted 8 years ago #

    As a specific example, if I were to type the following code in the page editor,
    <ul>
    <li>1</li>
    <li>1</li>
    <ul>
    <li>2</li>
    <li>2</li>
    </ul>
    <li>1</li>
    <ul>
    <li>2</li>
    <ul>
    <li>3</li>
    </ul>
    </ul>
    <ul>
    <li>2</li>
    </ul>
    <li>1</li>
    </ul>

    the code that WordPress generates is
    <ul>
    <li>1</li>
    <li>1</li>
    </ul>
    <ul>
    <li>2</li>
    <li>2</li>
    </ul>
    <li>1</li>
    <ul>
    <li>2</li>
    </ul>
    <ul>
    <li>3</li>
    </ul>
    <ul>
    <li>2</li>
    </ul>
    <li>1</li>

    which is incorrect.

    The problem seems to be WordPress and not the WYSIWYG editor; no matter how I type a list in, with the editor or with the plain HTML editor, WordPress changes the code I put in. I'm running WordPress 2.0.1; is there any way to get around this?

  4. moshu
    Member
    Posted 8 years ago #

    Eventually, try to disable the "WordPress should correct invalidly nested XHTML automatically" box on the Options > Writing panel.

  5. Chris_K
    Member
    Posted 8 years ago #

    Bug report has been filed: This thread has similar details: http://wordpress.org/support/topic/53022?replies=5

  6. DGrady
    Member
    Posted 8 years ago #

    Hot dog! Thanks, guys, that's a big help. Sorry I missed that other thread; I wouldn't have had to bother you all. Much appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic