From aef6df048ce6e48d51a979ef5db4b3a32054e74b Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Tue, 23 Apr 2024 23:06:04 -0700 Subject: [PATCH] allow the `` tag in `UIAlert` --- src/UI/UIAlert.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/UI/UIAlert.js b/src/UI/UIAlert.js index aa9e95f2..7016e138 100644 --- a/src/UI/UIAlert.js +++ b/src/UI/UIAlert.js @@ -46,11 +46,17 @@ function UIAlert(options){ if(options.type === 'success') options.body_icon = window.icons['c-check.svg']; + let santized_message = html_encode(options.message); + + // replace sanitized with + santized_message = santized_message.replace(/<strong>/g, ''); + santized_message = santized_message.replace(/<\/strong>/g, ''); + let h = ''; // icon h += ``; // message - h += `
${html_encode(options.message)}
`; + h += `
${santized_message}
`; // buttons if(options.buttons && options.buttons.length > 0){ h += `
`;