Uncaught SyntaxError: Unexpected token ‘:’
-
Uncaught SyntaxError: Unexpected token ‘:’
The issue originated from the plugin file located at /wp-content/plugins/easy-testimonials/include/lib/gp-testimonial.class.php, specifically on line 73. The error was triggered by the use of wp_kses before the output, like this: echo wp_kses($output, $tags);. Consequently, wp_kses was converting <script type=”application/ld+json”> to <script>.
To resolve this issue, I made a modification in wp_kses to allow the ‘script’ tag. The fix involved adding the following line: $tags[‘script’] = array(‘type’ => true);. This is fixed in the plugin file due to a bug in the plugin.
In order to implement the solution, I had to modify the plugin file.
so please fix it and update the latest version
- The topic ‘Uncaught SyntaxError: Unexpected token ‘:’’ is closed to new replies.