chat-bubble
chat-bubble copied to clipboard
single quotes in answers
if there is a single quote in prefixed reply question it occurred error with "Uncaught SyntaxError: missing ) after argument list" on questionsHTML
ie) if the answer is "i don't care" or else rest of chat will be stops with javascript error
You can escape single quotes like this: \’
Edit: with your example you'll need to type your answer out like this: "i don\'t care"
but still occurs same issues
this issues can be solved by using javascript escape function using escape(el.question) and escape(el.answer) in bubbles.js
@jbkeg Can you show me an example snippet of your code? I'd like to try and find out why it may occur.
The escape function might be an interesting way of dealing with these kinds of issues. If you'd like to submit a PR, I'll do some testing on it to see if it can be safely implemented.
Thanks for the sample, @sabatale ! I'm gonna reopen this since this is now a replicable issue.
For now, I suggest you try curly apostrophes: ’ instead of '.