Title: Javascript Syntax error when user&#039;s name contains apostrophe
Last modified: August 31, 2016

---

# Javascript Syntax error when user's name contains apostrophe

 *  [Nikola Nikolov](https://wordpress.org/support/users/nikolovtmw/)
 * (@nikolovtmw)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/javascript-syntax-error-when-users-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 `wayne` that’s not expected there).
 * The problem comes from not properly escaping/encoding the userdata. Please consider
   fixing this issue 🙂
 * [https://wordpress.org/plugins/zopim-live-chat/](https://wordpress.org/plugins/zopim-live-chat/)

The topic ‘Javascript Syntax error when user's name contains apostrophe’ is closed
to new replies.

 * ![](https://ps.w.org/zopim-live-chat/assets/icon.svg?rev=1522846)
 * [Zendesk Chat](https://wordpress.org/plugins/zopim-live-chat/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/zopim-live-chat/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/zopim-live-chat/)
 * [Active Topics](https://wordpress.org/support/plugin/zopim-live-chat/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/zopim-live-chat/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/zopim-live-chat/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Nikola Nikolov](https://wordpress.org/support/users/nikolovtmw/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/javascript-syntax-error-when-users-name-contains-apostrophe/)
 * Status: not resolved