Backslashes in titles and descriptions.

Discussion in 'ClassiCraft WordPress Theme' started by themotorcycledude, Aug 9, 2013.

  1. themotorcycledude

    themotorcycledude Member

    Joined:
    Jul 11, 2013
    Messages:
    83
    Likes Received:
    0
    Hi, if you click http://themotorcycledude.com/ad/another-test/

    You will see that the description is

    I\’m selling a voltage regulator

    The backwards slash is not supposed to be there. Perhaps you are escaping the single quotes? How can this be corrected?

    There are backslashes everywhere, titles, descriptions, recent posts. Screen shot 2013-08-08 at 8.26.54 PM.png

    Thanks.
     
  2. themotorcycledude

    themotorcycledude Member

    Joined:
    Jul 11, 2013
    Messages:
    83
    Likes Received:
    0
    The database is storing these escaped quotes. Here is the screenshot.

    Please please help me to fix this. This is so frustrating.

    Screen shot 2013-08-08 at 8.55.31 PM.png
     
  3. Piyush

    Piyush Support Staff

    Joined:
    Dec 8, 2012
    Messages:
    4,745
    Likes Received:
    107
    Hello,

    I have checked your website but I am not getting such issue on your site.
    Please specify the browser and their version on which you are facing this issue.

    See the link for reference,
    http://screencast.com/t/yhcbac0XQ
     
  4. themotorcycledude

    themotorcycledude Member

    Joined:
    Jul 11, 2013
    Messages:
    83
    Likes Received:
    0
    Your screencast DOES show the issue. In Recent Posts in the sidebar, you can clearly see the slashed quotes.

    I have fixed this issue in the main content area, that is why you no longer see it there.

    The solution was to go into tiny_mce_init.js and make the init function look like this:

    tinyMCE.init({ mode : "textareas", theme : "advanced", force_br_newlines : false, force_p_newlines : false, forced_root_block : '', });
     
  5. themotorcycledude

    themotorcycledude Member

    Joined:
    Jul 11, 2013
    Messages:
    83
    Likes Received:
    0
    I then had to add stripslashes() anywhere where there was data retrieved from the database that had slashes.
     

Share This Page