revolunet / react-mailchimp-subscribe

React subscribe form for Mailchimp.
https://revolunet.github.io/react-mailchimp-subscribe/
245 stars 48 forks source link

Error message includes html #14

Closed captDaylight closed 6 years ago

captDaylight commented 6 years ago

When I get an error message it's including html. For example on duplicate email:

myemail@gmail.com is already subscribed to list INFURA News. <a href="https://infura.us14.list-manage.com/subscribe/send-email?e=cGF1bC5jaHJpc3RvcGhlNkBnbWFpbC5jb20%3D&u=7bec10aa5be97e80fcb0e7c52&id=13433031de">Click here to update your profile</a>

How are others handling this? In the demo it seems the error message is just being dropped in as a string.

revolunet commented 6 years ago

Hi,

You should use dangerouselySetInnerHTML in your form. I've just patched the demo form to handle this, and you can get it with v2.0.2