• I haven’t had this problem with WordPress before, but I haven’t had it long. Today I attempted to make a post and this is when I first realized an issue/bug.

    I’d click the “Edit HTML Source” button and input my own html. I’m fluent in html, so I know I’m not making a mistake, I’ve looked the code over. First, some of my line breaks <br /> and <br> have been getting ignored. Not all but some. For example, an exert taken from the middle of a post:

    end of some text.</div>
    <br />
    <br />
    <div align="center">Hmm.... Okay.</div>
    <br />
    <br />
    <p align="center">more text...

    gets converted to:

    end of some text.</div>
    <div align="center">Hmm.... Okay.</div>
    <p align="center">more text...

    Second, the paragraph tags have been getting changed in an odd way.

    Exert:

    Text and et cetera.
    <p>A header:</p>
    Some more text.<br />

    after saving the post, it gets changed to:

    Text and et cetera.A header:</p>
    <p>Some more text.<br />

Viewing 7 replies - 1 through 7 (of 7 total)
  • Do you have the wsywig editor turned on – it is a Known issue that it, and the various filters like wp_autop, convert html.

    Try switching it off in the admin options writting panel and try again.

    Thread Starter ryanmosby

    (@ryanmosby)

    How do you turn it off? You mean going to Options > Writing

    And then unchecking the “Users should use the visual rich editor by default”?

    Because I’ve done that, made a new post with the html code I have saved elsewhere, and it changed the coding again to the examples above.

    Thread Starter ryanmosby

    (@ryanmosby)

    Hello? Anyone?

    Try User:Your Profile…

    Hello,

    Will that also allow the following html codes:

    [moderated – long code removed – use a pastebin service.]

    Thank you so much.

    Thread Starter ryanmosby

    (@ryanmosby)

    I did what Yosemite suggested and turned that off, and it appeared to work, but it’s still messing with the coding of my entry..! I’m not using the rich text editor; since changing my options, I’ve been putting in the code for my entries directly.

    For example, this:
    <p>Header</p>
    Some text.<br />
    Another line.<br />
    End of paragraph.

    is turning into this:
    <p>Header</p>
    <p>Some text.<br />
    Another line.<br />
    End of paragraph.</p>

    I had some text in a table (because of some online quiz results and when the last paragraph came to an end in the table cell, there was no end paragraph. I get XHTML errors from the w3 validator because the paragraph tag doesn’t having a closing, and because breaks shouldn’t be nested inbetween paragraph tags. Why is it changing my code?

    I am also having a serious problem with wordpress that directly relates to this topic on 2.0.3 (php5).

    edit: not sure how to post code correctly, assume the below is perfect XHTML for paragraph and links

    When I input the following for example:

    <div class="loca">
    < p>< a title="some link title" href="/somelink/"><img alt="image desc" src="someimage.jpg" /></a></p>
    < p>< a title="some link title" href="/somelink/">My link
    Continues here</a></p>
    </div>

    HTML Source Looks exactly like this removing my perfect markup:

    <div class="loca">< a title="some link title" href="/somelink/"><img alt="image desc" src="someimage.jpg" /></a></p>
    < p><a title="some link title" href="/somelink/">My link
    Continues here</a>
    </div>

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘HTML inputted into post converts wrong’ is closed to new replies.