enabled html rendering for message content

This commit is contained in:
David Mosbach 2023-05-28 18:37:06 +02:00
parent 5e46f0745b
commit a4dafe2365
2 changed files with 20 additions and 6 deletions

View File

@ -141,4 +141,18 @@ body {
::-webkit-scrollbar-thumb:hover {
background: rgb(120, 120, 120);
}
a {
text-decoration: none;
color: rgb(75, 151, 151);
font-weight: 500;
}
a:hover {
color: rgb(90, 184, 184);
}
a:active {
color: rgb(110, 212, 212);
}

View File

@ -53,17 +53,17 @@ class Message {
h = document.createElement('h3');
heading = document.createTextNode(this.fallbackLang);
h.appendChild(heading);
p = document.createElement('p');
text = document.createTextNode(this.fallback);
p.appendChild(text);
p = document.createElement('html');
p.setAttribute('lang', this.fallbackLang);
p.innerHTML = this.fallback;
result.push(h, p);
for (var t in this.translations) {
h = document.createElement('h3');
heading = document.createTextNode(t);
h.appendChild(heading);
p = document.createElement('p');
text = document.createTextNode(this.translations[t]);
p.appendChild(text);
p = document.createElement('html');
p.setAttribute('lang', this.translations[t]);
p.innerHTML = this.translations[t];
result.push(h, p);
}
return result;