Custom Tweet button is cutting off at hashtags


#1

Using JQuery, I’m making a popup box with a tweet in it. For some reason, the title field cuts off at the first hashtag. Any help would be appreciated
$(’.twitter’).on(‘click’, function() {
var loc = encodeURIComponent(‘http://ow.ly/A9vqD’),
title = “I contributed to the future of #dayton - you can support @telephonemag too via #indiegogo”,
w = 580, h = 300,
left = (screen.width/2)-(w/2),
top = (screen.height/2)-(h/2);

        window.open('http://twitter.com/share?text=' + title + '&url=' + loc, '', 'height=' + h + ', width=' + w + ', top='+top +', left='+ left +', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0');
});</code>

#2

It works if you encode properly the tweet’s text as you already do for the URL.


#3