• Because I’m lazy, I’ve been using some nbsp in the footer to separate some data.
    I put 5 in, using the correct ascii code.
    Save file, look and all is well.
    Look again, and WP has rendered the code into spaces, and of course the browser ignores 5 spaces in a row, seeing only one.

    This also happens when validating.
    If I use & a m p ; then it will validate correctly, but the WP will make that into just the & character and the validator gets upset about it.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Mark (podz)

    (@podz)

    Okay….more info:

    My page validated.
    I open up ‘sidebar.php’ and then save it without doing anything.
    Validation breaks.
    Reason is this:
    gi?USER=Tamba2&L=1"
    and the unencoded ampersand.
    I change that line to this:
    gi?USER=Tamba2&a m p ; L=1" (spaces added so it shows here)
    Save the page.

    It validates again.

    Open up ‘sidebar.php’, save with no changes.
    Validation breaks because of this again:
    gi?USER=Tamba2&L=1"

    Odd effect.
    Anyone else get this ?

    What text editor are you using to open sidebar.php up?

    Thread Starter Mark (podz)

    (@podz)

    The WP one.

    (As in the built-in text editor thingy)

    [The above sounds like some sort of prisoner…..”Free the WP one !!” 🙂 ]

    Thread Starter Mark (podz)

    (@podz)

    I just updated and checked – this still happens.

    Page validates.
    Re-save ‘sidebar.php’
    Validation fails in ‘sidebar.php’

    Mosquito looks very busy… so I’ve not put it there.

    Looks to me like, and I’ve had this problem with my index, the latest build of 1.5 (maybe all of them?), the built in editor is rendering & … ; characters and then causing problems. If you go through and edit all the special characters back to the & … ; and then save it, the problems will disappear. But, if you go back in again and edit the file without re-replacing the characters, it will break again.

    Thread Starter Mark (podz)

    (@podz)

    Bad bump behaviour as I’m adding nothing, but this persists.

    Another vote for that. Really not nice for people who like validation (like people who parse their sites as app/xhtml+xml).

    Changes to be made:
    wp-admin/templates.php on line 74: wp_specialchars($content) –> htmlspecialchars($content)
    wp-admin/theme-editor.php on line 76: wp_specialchars($content) –> htmlspecialchars($content)

    Use at your own risk.

    Oh, and of course: all credit goes to Matt and Podz for working this out.

    And to add even more to that: it’s in the CVS now, so get your latest!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘nobreakspace / validation issues’ is closed to new replies.