Title: Javascript syntax error in version 7.0
Last modified: November 12, 2021

---

# Javascript syntax error in version 7.0

 *  Resolved [christer_f](https://wordpress.org/support/users/christer_f/)
 * (@christer_f)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/javascript-syntax-error-in-version-7-0/)
 * Hi Aakash,
 * Today I updated your plugin on a site from version 6.4 to 7.0 and I’m now getting
   Javascript errors from wp-socializer.min.js. I switched to the non-minified version
   and found that the error appears on line 486. Error message:
 * “SyntaxError: Invalid regular expression: invalid group specifier name”
 * Then I put single quotes around the regular expression, and the error message
   goes away (but maybe this may cause other problems??)
 * — christer
    -  This topic was modified 4 years, 6 months ago by [christer_f](https://wordpress.org/support/users/christer_f/).

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/javascript-syntax-error-in-version-7-0/#post-15062987)
 * Hi Christer,
 * Thanks for checking. Looking at the error I guess it is something specific to
   safari browser.
 * Can you please check once in Chrome and share your website URL where error is
   observed ?
    I would like to see the issue live.
 * Thanks,
    Aakash
 *  Thread Starter [christer_f](https://wordpress.org/support/users/christer_f/)
 * (@christer_f)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/javascript-syntax-error-in-version-7-0/#post-15063016)
 * Thanks for your very quick reply!
 * No problem in Chrome!
 * I did the update on my local development system (I always do that before doing
   updates to a production environment), which is not accessible from the outside.
   I don’t want to update the production environment now since a Javascript error
   will impact other things, but I can copy over to a staging server. Will take 
   some 30 minutes. I’ll send you the URL when it’s done
 *  Thread Starter [christer_f](https://wordpress.org/support/users/christer_f/)
 * (@christer_f)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/javascript-syntax-error-in-version-7-0/#post-15063237)
 * This is the URL to the staging server:
 * [https://aravis.chrilleferna.opalstacked.com](https://aravis.chrilleferna.opalstacked.com)
 * I have switched to the unminified version of wp-socializer.js so you can see 
   on which line the problem shows up
 *  Thread Starter [christer_f](https://wordpress.org/support/users/christer_f/)
 * (@christer_f)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/javascript-syntax-error-in-version-7-0/#post-15064270)
 * Hi Aakash,
    Any news on this? I quick Google search tells me that this problem
   is due to Safari not supporting lookbehind in javascript regular expressions.
   This means that even when/if Safari starts supporting lookbehind the code will
   break in older browsers, so better change the regex to one without lookbehind.
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/javascript-syntax-error-in-version-7-0/#post-15064367)
 * Hi [@christer_f](https://wordpress.org/support/users/christer_f/),
 * I’m working on the issue. I’ll provide a workaround (i.e a code change) which
   you can make. Once I’m done testing I’ll share it with you.
 * Thanks,
    Aakash
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/javascript-syntax-error-in-version-7-0/#post-15064403)
 * Hi [@christer_f](https://wordpress.org/support/users/christer_f/),
 * Please find the modified code below.
    [https://pastebin.com/bg8sFeey](https://pastebin.com/bg8sFeey)
 * Copy and paste it to wp-socializer/public/js/wp-socializer.js
    Refresh browser/
   cdn cache if required.
 * This is not the the minified version. For now please continue with this. I’ll
   cover this issue as a part of the next release by next month mid.
 * Thanks,
    Aakash
 *  Thread Starter [christer_f](https://wordpress.org/support/users/christer_f/)
 * (@christer_f)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/javascript-syntax-error-in-version-7-0/#post-15064654)
 * Hi Aakash,
 * Works fine!
 * Thanks you SO much for your quick and accurate fix.
 * Cheers,
    — christer
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/javascript-syntax-error-in-version-7-0/#post-15065100)
 * Cheers !

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Javascript syntax error in version 7.0’ is closed to new replies.

 * ![](https://ps.w.org/wp-socializer/assets/icon.svg?rev=1616975)
 * [WP Socializer - Simple & Easy Social Media Share Icons](https://wordpress.org/plugins/wp-socializer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-socializer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-socializer/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-socializer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-socializer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-socializer/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [vaakash](https://wordpress.org/support/users/vaakash/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/javascript-syntax-error-in-version-7-0/#post-15065100)
 * Status: resolved