I am using a direct link with a popup for a share button on Twitter:
<a href="https://twitter.com/intent/tweet?url=<?php echo urlencode(get_permalink());?>&text=<?php echo get_the_title(); ?>&via=username" target="_blank"
With all the crazy social media plugins out there, this is the simplest and most direct way for me to implement a share button.
However, when there is an & in the title, the title will break the text that is supposed to show for the status. I understand you need to urlencode() the title, but when I do that, it displays the special characters in the status message.
Since you do not need a + for a [space] in the Twitter share now, I need to replace any &'s with &. However, it does not seem to work with str_replace(). It for some reasons outputs the HTML special characters. Doing something like <?php echo str_replace('&', '&', urldecode(get_the_title())); ?> doesn't work either.