WordPress.org

Ready to get started?Download WordPress

Forums

Backslashes in 1.2 get eaten (11 posts)

  1. Anonymous
    Unregistered
    Posted 9 years ago #

    FYI,
    WP1.2 eats backslashes. If you must use backslashes (e.g., for win32 filenames), you must enter two backslashes (not a real problem). However, the preview is incorrect, in that two backslashes result in two backslashes being displayed (not one). What's worse is that, every time you preview or edit a post, one backslash gets silently "eaten" from the source, until none are left.

  2. Qiwi
    Member
    Posted 9 years ago #

    This behavior also makes it diffucult to escape the Smartypants plugin, which uses a backslash as its escape character.

  3. justinbaeder
    Member
    Posted 9 years ago #

    I think this is because WP is very big on XHTML validity. I don't know why they aren't escaped, though. I've also had problems with the elipsis character (...) being created by WP, then breaking the XML validity of my RSS feed, as they are not valid XHTML unless they are escaped with the proper ASCII code. Any idea when this will be fixed? Or is this not really a problem, and I'm missing something? Thanks!

  4. Anonymous
    Unregistered
    Posted 9 years ago #

    I've noticed it does essentially the same thing with double-dashes. If I specify, in a <code /> block, a command-line with double-dashes (ie. "--prefix=/usr/local" becomes "-prefix=/usr/local").
    It doesn't "eat" the missing dash, it just collapses doubles into singles.
    I'm assuming that somewhere there is a regexp causing it.

  5. Anonymous
    Unregistered
    Posted 9 years ago #

    Heh, oops. In the post directly above, right before the word "block", I had the word "code" enclosed between a less-than and a greater-than.
    Tho, interestingly enough, in my example the double-dash was not collapsed.

  6. Anonymous
    Unregistered
    Posted 9 years ago #

    Sorry, it probably seems like I'm spamming this topic. The issue I had with dashes is actually by design. The function wptexturize in "wp-includes/functions-formatting.php" converts pairs of dashes to an "en dash."
    Nevermind ;)

  7. Anonymous
    Unregistered
    Posted 9 years ago #

    (From Meitar, not the above anonymous user)
    Nevertheless, single backslashes in posts *do* get eaten, and this is somewhat troublesome since I need to be able to type them, obviously.
    Is there any definitive answer on whether this is or is not a bug (and if so, when it might be fixed)? I haven't had the time to dig through the source of WordPress myself yet, and I'm sure others are more familiar with it than I.

  8. Anonymous
    Unregistered
    Posted 9 years ago #

    Shouldn't double-dashes be replaced into an M-DASH, not an N-dash, from a typographical point of view?

  9. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    This bug is already fixed in CVS. 1.3 will not have this problem.

  10. randall
    Member
    Posted 9 years ago #

    rboren,
    Can the fix be back-ported to 1.2 easily? Any hints on where to look for it?

  11. randall
    Member
    Posted 9 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.