WordPress.org

Support

Support » How-To and Troubleshooting » HTML Editor is mangling my code

HTML Editor is mangling my code

  • I’m building out a data grid using lists that I’ve set to display as table rows and table cells.

    Some of the cells have no data, so I have them as an empty set of list items. This makes the columns and rows line up correctly. It looks like this:

    <ul>
    	<li>Row 1</li>
    	<li>x</li>
    	<li>x</li>
    	<li>x</li>
    	<li>x</li>
    </ul>
    <ul>
    	<li>Row 2</li>
    	<li>x</li>
    	<li></li>
    	<li>x</li>
    	<li>x</li>
    </ul>

    When I publish that, WP strips out the empty list item –

  • So then I thought I would add a non-breaking space in there. The first time I publish it, WP removes the nbsp leaving an empty set. Then the next time I publish it, WP removes the empty set.

    I have “WordPress should correct invalidly nested XHTML automatically” unchecked.

    How do I get WP to leave my HTML alone?

    I’m using 2.7.1.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Anyone? I’m running into yet another instance where WP thinks it knows how to write code better than I do. This time I just want to align an image to the left of a paragraph, but it keeps stripping out my formatting. It’s all xhtml strict code.

    This is a “feature”. If you find it as annoying as most other users, upvote http://wordpress.org/extend/ideas/topic.php?id=437

    Thanks much. They should at least quit calling it the “HTML” editor if it doesn’t let you edit the HTML and just their own bastardized version of it. At least Microsoft calls their excuse for HTML “MSHTML”.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HTML Editor is mangling my code’ is closed to new replies.
Skip to toolbar