Support » Requests and Feedback » Error editing a comment with an apostrophe

  • Resolved ColinB


    When I edit a comment that contains an apostrophe (single quote) I get an SQL error:
    Database error: [You have an error in your SQL syntax near ‘with’ some apostropeh’ees’, comment_author = ‘crb’, comment_author_email =’ at line 3]
    UPDATE plog_comments SET comment_content = ‘a comment’ with’ some apostropeh’ees’, comment_author = ‘crb’, comment_author_email = ”, comment_author_url = ” WHERE comment_ID = 206
    I’m using wordpress 1.2. I noticed this error has been reported before:

Viewing 6 replies - 1 through 6 (of 6 total)
  • Ryan Boren


    WordPress Dev

    Fixed in CVS.

    Wow, that was fast. Thanks for the info. Me === happy WordPress user 😉

    I’m having a related problem with WP 2.0.3. When I edit a published comment that contains a single or double quotation mark, the quotation marks show up with escape slashes in front of them after the comment is republished.

    For example, if I edit a comment that says:

    >> I don’t know why you say this is a “problem.”

    It shows up like this after the editing:

    >> I don\’t know why you say this is a \”problem.\”

    Is this a known issue? Is there any way to resolve it? Thanks in advance for your help.

    Yes, known issue. one resolution was already mentioned in this thread. However, there’s a plugin that will help you out as well:

    awesome — thanks!

    Final note for any future readers: I installed the plugin from the link above, but got a php error when I used WP afterwards.

    The author of the plugin provides a direct download link in this comment; using that worked for me.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error editing a comment with an apostrophe’ is closed to new replies.