mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-03 19:37:46 +01:00
purify popup warning string
This commit is contained in:
parent
74c0a194fd
commit
a8f6e5c5f7
@ -1525,7 +1525,7 @@ async function onTagRestoreFileSelect(e) {
|
|||||||
if (warnings.length) {
|
if (warnings.length) {
|
||||||
toastr.warning('Tags restored with warnings. Check console or click on this message for details.', 'Tag Restore', {
|
toastr.warning('Tags restored with warnings. Check console or click on this message for details.', 'Tag Restore', {
|
||||||
timeOut: toastr.options.timeOut * 2, // Display double the time
|
timeOut: toastr.options.timeOut * 2, // Display double the time
|
||||||
onclick: () => Popup.show.text('Tag Restore Warnings', `<samp class="justifyLeft">${warnings.join('<br />')}<samp>`, { allowVerticalScrolling: true }),
|
onclick: () => Popup.show.text('Tag Restore Warnings', `<samp class="justifyLeft">${DOMPurify.sanitize(warnings.join('\n'))}<samp>`, { allowVerticalScrolling: true }),
|
||||||
});
|
});
|
||||||
console.warn(`TAG RESTORE REPORT\n====================\n${warnings.join('\n')}`);
|
console.warn(`TAG RESTORE REPORT\n====================\n${warnings.join('\n')}`);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user