WordPress.org

Support

Support » How-To and Troubleshooting » Switching between visual and html editor corrupts html code in pre tags

Switching between visual and html editor corrupts html code in pre tags

  • 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>
Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.

    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?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Switching between visual and html editor corrupts html code in pre tags’ is closed to new replies.
Skip to toolbar