Hello Everyone,
Please review my quote machine and suggest ways to improve on my work.
Thanks.
Hello Everyone,
Please review my quote machine and suggest ways to improve on my work.
Thanks.
This is looking good ! I like the color changes when getting new quotes 
You might have to check your code when doing substr on longer quotes because on this quote :
When hungry, eat your rice; when tired, close your eyes. Fools may laugh at me, but wise men will know what I mean
…Lin-Chi
my tweet was getting only this text :
_When hungry, eat your rice
As a sidenote, many people decided to hardcode the quotes and get a random one each time, but I think if you have time and want to look in a challenge, you might find websites that delivers random quotes through an API. Theses kind of exercices will come later in other FCC challenges but it could be a nice addition (getting 1 random quote out of a possibility of thousands)
Good job !
In fact the problem seems to be the “;” character in you quote. It breaks when Twitter comes over it.
A way to fix this would be to replace this character after encodeURI with it’s html entity format :
;
In fact, it seems that “;” and other characters are reserved by encodeURI and are not encoded, see MDN
Thanks Mizu. I will work on your suggestion…