What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

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

2 Answers 2

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 .