Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 155 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I just tweeted a link to this question http://programmers.stackexchange.com/questions/25836/what-is-the-best-c-interview-question and the content had the two + signs (for C++) replaced with spaces. I edited it back to + signs, but I don't see why it should do that?

share|improve this question
up vote 1 down vote accepted

aha, correct, this was a bug

var url = 'http://twitter.com/share?url=' + encodeURIComponent(link) + 
          '&ref=twitbtn&text=' + encodeURIComponent(message);

versus

var url = 'http://twitter.com/share?url=' + encodeURIComponent(link) + 
          '&ref=twitbtn&text=' + escape(message);
share|improve this answer

The plus sign (+) just needs to be encoded before it's sent to Twitter.

So the part that's this:

What%20is%20the%20best%20C++%20interview%20question%3F

should ideally, if we're wanting to double-plus the face (which itself isn't on the question's URL), be this:

What%20is%20the%20best%20C%2B%2B%20interview%20question%3F

Twitter just interprets the plus signs as a space because that's the shorthand.

So it's and/or depending on if that plus sign will ever be encoded before being sent.

share|improve this answer
    
I'm not worried about the URL, but the actual content of the tweet. – Kate Gregory Dec 12 '10 at 23:37
    
The URL sent to Twitter (which creates the tweet content) is causing Twitter to interpret the ++ as spacespace @kat – random Dec 12 '10 at 23:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .