• Resolved mrprainx

    (@mrprainx)


    Hello. First of all thank you for this great plugin! Works like a charm, it’s light, effective and stylish.

    I’m implementing a simple button using the shortcode. I’ve noticed that using an apostrophe ( ‘ ) inside a location attribute of a sub-event breaks the shortcode and prevent the button to render. Is this a known issue? Is there already a workaround? I’ve tried using the HTML code (') but it’s not “translated” in the location string when added to the chosen calendar.

    Example:

    [add-to-calendar-button name="MY EVENT" organizer="Marco|[email protected]" options="'Apple','Google','iCal','Microsoft365','MicrosoftTeams','Outlook.com','Yahoo'" buttonStyle="round" language="it" timeZone="Europe/Rome" dates='

    {

    "name":"1/2 - MY EVENT",

    "description":"First Day",

    "startDate":"2025-05-09",

    "location":"Via dell'Acquedotto Romano 155, Roma, Italia"

    },

    {

    "name":"2/2 - MY EVENT",

    "description":"Second Day",

    "startDate":"2025-05-10",

    "location":"Via dell'Impero Romano 120, Roma, Italia"

    }

    ']

    As you can see in both locations there is an apostrophe in the address. This prevents the button to show up.

    If I change the addresses in something like

    "location":"Via Acquedotto Romano 155, Roma, Italia"

    and

    "location":"Via Impero Romano 120, Roma, Italia"

    everything works fine. Unfortunately, apostrophe is a very important punctuation mark in Italian (and other languages).

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Jens Kuerschner

    (@jekuer)

    Hi there!

    This is not a misbehavior of the plugin, but a misconfiguration of your shortcode.
    You are starting the dates-attribute with a single quote. Therefore, the single quote in your location is ending the attribute.

    You have 2 options here:

    1. You use a special character. Not encoding it, but actually copying the character, like this one:
    2. You do not use a single quote for the dates object, but rather for example ´
    Thread Starter mrprainx

    (@mrprainx)

    Oh! Now I see.

    Great. Thank you @jekuer

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

The topic ‘Apostrophe ‘ breaks the shortcode’ is closed to new replies.