• Resolved fmchris

    (@fmchris)


    I’m trying to post code snippets on my blog. However, when I posted something like:

    <pre>
    <?php
    echo("Hi!");
    ?>
    </pre>

    It added a space in the PHP tag, like so:

    < ?php

    I tried both HTML entities (&lg;) and the actual < character, but it added a space either way. It is wrapped inside a <pre> tag.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’d recommend using one of the code plugins if you want to post code examples on your blog. I use WP-Syntax.

    Thread Starter fmchris

    (@fmchris)

    I’ve tried using those, and it still does it regardless, even in the highlighter.

    It’s something that the post editor is doing, I think. Because as soon as I save the post it adds the space.

    wordpress 2.7 is still doing this, causing some trouble trying to get any syntax highlighters to work

    I figured it out, if you have the “correct xhtml tags” on writing -> settings, it will add a space.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress 2.6.0 adding spaces in PHP tags when posting’ is closed to new replies.