WordPress.org

Ready to get started?Download WordPress

Forums

Switching between visual and html editor corrupts html code in pre tags (3 posts)

  1. dnene
    Member
    Posted 5 years ago #

    Enter the following in the HTML editor

    Google syntax highlighter latest version is also installed.

    <pre name="code" class="html">
        <html>
            <head>
                <title>Test</title>
            </head>
            <body>
                <h1>Test</h1>
            </body>
        </html>
    </pre>
  2. kodysmith
    Member
    Posted 5 years ago #

    This is an old bug but should really be fixed. At least have the editor ask if you want your html changed. This will also strip out iframes used for such things as ads.

    I generally disable the visual editor for this reason.

  3. danblee
    Member
    Posted 5 years ago #

    So how do you guys generally get around this issue then? Even if I stay strictly in the HTML editor, because of the auto paragraph, I still can't get my pre or code tags to come out right.

    Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic