• Hey guys,

    WordPress HTML editing is really annoying me.
    I need to insert a code like this:

    <div id="test">
    <ul>
    <li>...</li>
    <li>...</li>
    </ul>
    </div>

    And, even in the Code tab (I’m using WordPress 2.1), it’ll turn it into something like this:


    <p id="test">&nbsp;&nbsp;</p>
    <ul>
    <li>...</li>
    <li>...</li>
    </ul>

    And it’s not the only annoyance I’ve found. It also removes the <p> tags and instead it inserts \n to recreate the <p> later.

    How do you *really* edit *raw* html ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • That appears to be this bug;
    http://trac.wordpress.org/ticket/3617

    and from my installs it only seem to affect the WYSIWYG editor. Though if you use the plain editor it will insert a opening p tag right after the opening div tag and does not close the p tag. That is this bug;
    http://trac.wordpress.org/ticket/3669

    If you apply the fix found there it will close the p tag or alternately if you comment out line 66 of formatting.php it doesn’t insert that offending p tag at all and so far I have found nothing else it breaks.

    You might want to look at his thread;
    http://wordpress.org/support/topic/101906/page/2?replies=41

    this thread;

    http://wordpress.org/support/topic/102799?replies=2
    contains a fix for the WYSIWYG p problem

    Try turning off the “WordPress should correct invalidly nested XHTML automatically” box in Options/Writing. Could also try turning off “Use the visual editor when writing” option in “Your profile” under Users.

    Edit: Or you could try what’s written above LOL

    If you have access to your database, you can find and edit your post directly there. It’s in raw html. I used to do it when the editor of 2.0 pissed me off by nesting tags strangely.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    How do you *really* edit *raw* html ?

    Without modification, you don’t. The system was not designed to let you enter raw HTML. WordPress is a tool for normal people, not for geeks like us that happen to know HTML.

    If you really want to disable wordpress’s formatting:
    1. Options->Writing. Turn off “WordPress should correct invalidly nested XHTML automatically”.
    2. Users->Your Profile. Turn off “Use the visual editor when writing”.
    3. Install this plugin: http://ottodestruct.com/wpstuff/disableautop.zip and activate it. It will disable the automatic paragraph formatting functions in wordpress. This will likely make your existing posts look like crap, but if you really want full control, that’s the way it is. No automatic paragraph formatting.

    Thread Starter Appletalk

    (@appletalk)

    I just wish the CODE tab would let me do just that, edit the raw code 🙁

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Having a hard time editing HTML’ is closed to new replies.