Fix toast._show was not showing html text correctly
This commit is contained in:
parent
a5c9f07f2e
commit
ceefa2a363
|
@ -294,6 +294,9 @@ const toast = {
|
||||||
div.id = id;
|
div.id = id;
|
||||||
div.className = 'toast-container';
|
div.className = 'toast-container';
|
||||||
div.setAttribute('onclick', 'this.remove()');
|
div.setAttribute('onclick', 'this.remove()');
|
||||||
|
text = text.replaceAll('&','&').replaceAll('<','<').replaceAll('>','>');
|
||||||
|
text = html2text(text);
|
||||||
|
text = text.replaceAll('&','&').replaceAll('<','<').replaceAll('>','>');
|
||||||
div.innerHTML = '<div class="toast '+type+'"><p style="margin: auto 0 !important;font-size: 1.2em;line-height: 1.8em;">'+
|
div.innerHTML = '<div class="toast '+type+'"><p style="margin: auto 0 !important;font-size: 1.2em;line-height: 1.8em;">'+
|
||||||
'<i style="margin-right: 1em;font-size: 1.2em;position:relative;top:.1em" class="fa fa-'+fa+'"></i>'+capitalize(text)+'</p></div>';
|
'<i style="margin-right: 1em;font-size: 1.2em;position:relative;top:.1em" class="fa fa-'+fa+'"></i>'+capitalize(text)+'</p></div>';
|
||||||
if (document.getElementById('toast-container') !== null)
|
if (document.getElementById('toast-container') !== null)
|
||||||
|
|
Loading…
Reference in New Issue