Skip to content

Special Characters in Twitter Message on WordPress SexyBookmarks Plugin

I recently installed the SexyBookmarks WordPress plugin on my blog (as you can see below). If you hover over the Twitter badge, you’ll notice my default sharing message includes both apostrophes and quotation marks. (While you’re down there, feel free to share this post =)) Seems simple enough, right?

This is deceptively simple, due to a shortcoming somewhere in the plugin or WordPress itself. I didn’t spend too much time investigating.. Just found a solution that satisfied me and moved on with my life (including writing this so you have a solution too).

The problem: The SexyBookmarks plugin and/or WordPress escapes the special characters in Twitter message after saving it. (You’ll notice backslashes before these characters, such as apostrophes and quotes, in the message editing textarea after saving it.) Furthermore, you’ll notice when actually trying to share a page via Twitter, for a message like

I’m currently reading “${title}” by @codyaray - ${short_link}

you’ll get something like

I\'m currently reading \quot;${title}\quot; by @codyaray -

when you try to share a post on Twitter. That’s no good.

My solution: Type up your message in MS Word or another rich text editor that auto replaces your ASCII special characters with Unicode chars. Thus, the message becomes

I’m currently reading “${title}” by @codyaray - ${short_link}

Well, typesetting on my blog makes those two indistinguishable to you, but I swear they’re different. Try it for yourself. It works.

Eureka! It’s not ideal, but it does the trick nicely.

Posted in Tutorials.

6 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Jay Meattle says

    Did you try “beta” mode yet? love to get your feedback on it! Wondering if this issue would repeat in beta.

    • codyaray says

      Thanks for listening and being in touch! Alas, I tried with beta mode, and still had the same problem…

  2. Jay Meattle says

    On our list of fixes for the next release!

    • codyaray says

      Thanks, Jay! It’s good to see a company so attentive.. I hope you’re not really working at 4:08am though (diff timezone, perhaps?), because that’d be a bit obsessive =P

      • Anna says

        hypocrite 😉 how many times have you stayed up working until the sun came up?

  3. codyaray says

    Just once or twice 😉

Some HTML is OK

or, reply to this post via trackback.


Log in here!