mirror of
https://github.com/HeyPuter/puter.git
synced 2026-02-04 21:11:17 -06:00
allow the <strong> tag in UIAlert
This commit is contained in:
@@ -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 <strong> with <strong>
|
||||
santized_message = santized_message.replace(/<strong>/g, '<strong>');
|
||||
santized_message = santized_message.replace(/<\/strong>/g, '</strong>');
|
||||
|
||||
let h = '';
|
||||
// icon
|
||||
h += `<img class="window-alert-icon" src="${html_encode(options.body_icon)}">`;
|
||||
// message
|
||||
h += `<div class="window-alert-message">${html_encode(options.message)}</div>`;
|
||||
h += `<div class="window-alert-message">${santized_message}</div>`;
|
||||
// buttons
|
||||
if(options.buttons && options.buttons.length > 0){
|
||||
h += `<div style="overflow:hidden; margin-top:20px;">`;
|
||||
|
||||
Reference in New Issue
Block a user