Javascript Syntax error when user's name contains apostrophe
-
If the current user has an apostrophe in their name(say it’s De’wayne), the plugin produces the following code:
$zopim.livechat.set({name: 'De'wayne'...Obviously that’s invalid JavaScript(since the string is closed and then there’s a
waynethat’s not expected there).The problem comes from not properly escaping/encoding the userdata. Please consider fixing this issue 🙂
The topic ‘Javascript Syntax error when user's name contains apostrophe’ is closed to new replies.