• Resolved gra104

    (@gra104)


    Google Search Console identified a “Bad escape sequence in string” error from the script generated by Event Schema. Additionally it says, “items with this issue are invalid. Invalid items are not eligible for Google Search’s rich results.”

    I’m using Events Manager for my events, and I have a Location that includes a single quote, but it is being converted to a ' character. Therefore, this is appearing in my script:

    “location”:{“name”:”My Company\'s Name”}

    instead of like this:

    “location”:{“name”:”My Company’s Name”}

    I believe the \' (and maybe the backslash specifically) is causing the error. Can you fix that within the plugin? Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Rajat Patel

    (@rajat1192)

    Hello @gra104 ,

    Thank you for reporting this issue.

    We’ve reviewed it and implemented a fix. Please copy and replace the code from the following file into your setup:

    https://gist.github.com/Rajat1192/50b9635f87e5801dec8d1562f21c5eef

    File path: /event-schema/includes/class-event-schema-common.php

    Once you’ve applied the update, please check again. If the issue still persists, feel free to contact us via our website, and we’ll be happy to assist you further.

    Thread Starter gra104

    (@gra104)

    Hi @rajat1192 ,

    Thanks for the update and quick response. I tested the new code and everything seems to now render correctly in the json script. Will you be releasing a new version of the plugin with this addition?

    Thanks again!

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

You must be logged in to reply to this topic.