diff --git a/assets/js/src/listing/notices.jsx b/assets/js/src/listing/notices.jsx
index d362944d89..00b7394dd1 100644
--- a/assets/js/src/listing/notices.jsx
+++ b/assets/js/src/listing/notices.jsx
@@ -39,6 +39,36 @@ const MailerError = (props) => {
message += message ? ', ' : '';
message += MailPoet.I18n.t('mailerErrorCode').replace('%$1s', code);
}
+
+ // allow tags with some attributes
+ const links = [];
+ message = message.replace(/.*?<\/a>/g, (match) => {
+ links.push(match);
+ return `[link-${links.length - 1}]`;
+ });
+
+ message = ReactStringReplace(message, /\[link-(\d+)\]/g, (match) => {
+ const link = new DOMParser().parseFromString(links[match], 'text/xml').firstChild;
+ return (
+
+ { link.textContent }
+
+ );
+ });
+
+ // allow
tags
+ let brKey = 0;
+ message = ReactStringReplace(
+ message,
+ /(
)/g,
+ () =>
// eslint-disable-line no-plusplus
+ );
+
return (