• Resolved annettepixie

    (@annettepixie)


    Hi,
    I’m using 2 radio button merge fields to record consent for privacy and emails – the GDPR Compliance for Mailchimp plugin only provides one checkbox for email consent so I can’t use that.

    The radio button option ( I convert to checkboxes via javascript ) includes a single quote which Mailchimp converts to html entities & #39; The form submission is failing as the json sent to Mailchimp is escaping it \\ & #39;

    Example of json response:
    Value must be one of: I agree to my personal data being stored by MailChimp and used for the distribution of the XXXs& #39; weekly insights newsletter. (not I agree to my personal data being stored by MailChimp and used for the distribution of the XXXs\\& #39; weekly insights newsletter.)

    Is there anything I can do in a filter to correct this?

    Also, is there any way to add html to the form before the submit button other than javascript?

    Thanks

    • This topic was modified 2 years, 7 months ago by annettepixie.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @annettepixie,

    We have a fairly extensive list of filters and actions that you can hook.

    That being said, there shouldn’t be a space in & #39;. If you find a way to get rid of that, it should be correctly treated as a single quote.

    Let me know if that helps,
    Jon

    • This reply was modified 2 years, 7 months ago by jpowersdev. Reason: It was decoding the html entity
    Thread Starter annettepixie

    (@annettepixie)

    Hi @jpowersdev

    Thanks for the reply – I had to edit my question and put in a space in & #39; as it was being converted to a single quote ' even though I’d put it in code blocks – there wasn’t a space in the actual json response.

    For anyone with a similar issue, I used the yikes-mailchimp-filter-before-submission filter and htmlentities() on the single quote.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Escaping htmlentities’ is closed to new replies.