Hello,
Thanks for your reply.
I don’t think I can make that work, here’s why.
var printOut = "<div class=\"row text-center\"></div> <a href=\"https://twitter.com/intent/tweet?text=" + "%22" + array2[0].wiseQuote + "%22";
printOut += " -" + array2[0].whoSaidIt + "\" class=\"twitter-share-button\" data-size=\"large\"></a>";
twttr.widgets.load($(".quote")); //Twitter dev wrote this for me, this is called in the html below.
<div class = "jumbotron jumbo row text-center quote">
<h2>Click the button for a quote.</h2>
</div>
So, the random quote text is a variable, array2[0].wiseQuote, which is being placed by my JavaScript, and I cannot, and probably should not, make an exception for instances where quotes contain special characters such as question marks. There must be URL encoding happening somewhere in the twitter widgets JavaScript, (https://platform.twitter.com/widgets.js) which is happening at some point after the tweet button is clicked, and then un-encoding before passing the text to the tweet text area, I’m guessing?
OK I finally decided to make a JSfiddle to share because I can’t get the tweet button to work AT ALL in codepen, but guess what, It doesn’t work in JSfiddle either, so here’s the codepen. It works fine in FF and Chrome when I test it locally, so idk what the problem is??? Well here’s the link anyway if you want to see all my code: codepen