Support » Fixing WordPress » apostrophe s returns slash apostrophe

  • Resolved deesgee

    (@deesgee)


    In the about field of my blog at http://www.duncangroveblog.com, every time I type an apostrophe s I see a backslash apostrophe ‘s/. eg I want to see Duncan’s and I see Duncan\’s.

    I have tried everyhting to resolve this but no sucess to date. For info my sql database shows
    My SQL charset UTF-8 Unicode (utf8)
    My SQL connection collation: (in drop down box utf8_unicode_ci

    I would very mich appreciate guidance.

Viewing 7 replies - 1 through 7 (of 7 total)
  • vtxyzzy

    (@vtxyzzy)

    I can’t see your site. Did you just upgrade to 2.9 by any chance?

    Right after I upgraded, I started having the same problem in one of my plugins. I had to find where the field was being input and add ‘stripslashes($the_field)’ into the code to correct it.

    deesgee

    (@deesgee)

    Thanks for the reply. Do I just put that code anywhere in the page in the bphp file?

    vtxyzzy

    (@vtxyzzy)

    I don’t know what the bphp file is. Since I can’t search the code in your theme, you will need to do that yourself. Find the part that has the text ‘begin abut’ (note the spelling). That is where the About box is generated.

    As far as the code to insert, it will probably not be what I gave as an example; your field name is not likely to be $the_field.

    Once you find the .php file containing ‘begin abut’, post that file in wordpress.pastebin.ca and post the link to it here so I can take a look. Maybe then I can be more specific.

    vtxyzzy

    (@vtxyzzy)

    Disregard the previous post – I found your theme and downloaded it.

    The code in question is in sidebar.php. I think this will work – change this line (line 48):

    $about = get_option('pov_about');

    to this:

    $about = stripslashes(get_option('pov_about'));

    deesgee

    (@deesgee)

    Bingo! Sorted – well done!

    I am most enormously impressed that you know how to fix my problem but even more impressed that you would take the trouble to find my theme, download it and identify the propblem file. Thank you so much!

    I see that you are based in Kentucky and are retired. If you now find the time for that world trip, give me a shout if your intierary includes London!

    Thanks again – the problem has been really bugging me for a couple of weeks because it looked so unprofessional.
    Regards
    Duncan

    vtxyzzy

    (@vtxyzzy)

    You are most welcome! If you come to the Kentucky Derby, look me up.

    Nine months on I had to re-install my theme. Obviously slashes reverted. I was able to find your advice from nine months ago and re-implement it. Thanks again!!

    Regards
    Duncan Grove

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘apostrophe s returns slash apostrophe’ is closed to new replies.