• I made the changes suggested to fix the problem of WordPress stripping backslashes out of the text of a post, and it seems to have had an unintended side effect of causing post titles that contain apostrophes and other characters that need to be escaped when passed to the database to have extra backslashes in them. You can see the problem at rellek.net/blog

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter justice_nd

    (@justice_nd)

    I just tried stevem’s suggestion, and putting back either of the calls to stripslashes individually either fails to fix the extra backslashes in the post title or causes WP to resume its backslash-eating behavior.

    Thread Starter justice_nd

    (@justice_nd)

    Is nobody else seeing this at all? I tried stevem’s second suggestion (correcting the obvious typos in there), and it didn’t help either. Can someone else running 1.2.1 with the backslash-eating fixes done test this? I’m getting the extraneous backslashes if I go back to edit a post. Things work fine when initially making the post, but when the post is loaded to edit, the slashes aren’t stripped out of the Post Title, so if you don’t mannually take them out, they reproduce. Thanks!

    Thread Starter justice_nd

    (@justice_nd)

    Thanks! I added stripslashes to the line
    $edited_post_title = format_to_edit($postdata->post_title);
    and now everything seems to be working fine. I’m not sure if this is the best option for a permanent fix, of course, as I’m not familiar with WP’s internals. Is there anywhere in particular that I should report this as a bug so that the developers squash it the right way?

    Glad it’s working. Basically the fix puts back the stripslashes just for the title that were taken out in format_to_edit.
    I would guess that you could report it at Requests and Feedback at http://wordpress.org/support/4
    Do put what plugins/hacks you are using as they may be causing the problem.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Extra backslashes in post titles’ is closed to new replies.