Formatting error when tweeting a random quote

I am having issues when I go to click my tweet button, the random quote will have an unexpected return right before the closing quotations and that some characters such as " ’ " are not being encoded and appear as ’ in the tweet. Has anyone had this issue or have any feedback on how I can go about fixing this problem?

Here is a link to my code pen:


$("#tweet").on("click", function() {

Thanks that seemed to fix the issue. There still is some inconsistency with the quote function now, but I think it has more to do with the API than the javascript.