Random quote machine problem with quote

Random quote machine problem with quote
0.0 0

#1

I have a problem with the text to be shared, when the quote have a ’ the share is cut before that '.
I am reading and searching but I cant find how to solve that.


#2

You have to encode the text. Use encodeUriComponent().


#3

Nice to have an answer here, Thank you. I got the same answer on fullstack overflow and solved the problem.