Hello Everyone! I’m stuck with this problem: When I press the twitter button to share a quote on Twitter, it doesn’t fully display the quote and omit the author, but sometimes it does work fine. Any idea why? Thank you in advance!
Here is my codepen: https://codepen.io/Flor95/full/dyYOzRr
So I noticed that semicolons are ruining the quotes because it cannot be used in urls. If you filter out those types of characters, I reckon it will work. Good luck to ya!
Thank you looking at my code @CaraLagumen, I truly appreciate it.
I just did what you suggested me but still doesn’t work. I don’t know why it works with most of the quotes but some seem to break
No problem. Did you try to find out what from the quote could possibly be breaking it still? I would try logging all the quotes that break it to narrow the problem down.
I used this and it seemed to solve it though. Could you check if this works for you?
quote: randomQuote.quote.toString().replace(/;/g, ','),
That’s great! I learn something new today too, so thanks!