Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

single quotes in answers #60

Open
jbkeg opened this issue Jul 27, 2018 · 5 comments
Open

single quotes in answers #60

jbkeg opened this issue Jul 27, 2018 · 5 comments

Comments

@jbkeg
Copy link

jbkeg commented Jul 27, 2018

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

@dmitrizzle
Copy link
Owner

dmitrizzle commented Jul 27, 2018

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"

@jbkeg
Copy link
Author

jbkeg commented Jul 30, 2018

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

@dmitrizzle
Copy link
Owner

@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.

@sabatale
Copy link

sabatale commented Dec 2, 2021

I can confirm "i don\'t care" does not work.

See https://codepen.io/sabatale/pen/XWebMzM.

@dmitrizzle
Copy link
Owner

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 '.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants