Regarding the random quote machine

Hi everyone, I have pretty much done with the random quote generator, just been having a little bit of problem with the tweet button. In the content of the tweet, some special characters are not being converted back namely en dash, apostrophe, and “…”, couldn’t figure out why. I think I need a bit of help.

Here is my code: https://codepen.io/t6huho00/pen/RxrPmQ?editors=1111.

Thank you for reading and potentially helping. Any feedback is appreciated.

Solution: I have later found out the that the API I’m referencing was using HTML entities in their content, which led to the encoding method not working correctly, since they interpret the entities as literals. Had the source used Unicode symbol, no errors would have occured.

Thank you for the quick response @camperextraordinaire! I have considered creating a solution for my own but I thought nothing should go wrong when I use the encodeURI/encodeURIComponent method, so I thought maybe I was applying them in a wrong way, will look into the material right away. I also agree about the color usage.