Update changelog and html rendering.

This commit is contained in:
James Cole
2026-03-21 07:01:42 +01:00
parent 7c09278c8e
commit 266cd7d8d0
2 changed files with 10 additions and 2 deletions

View File

@@ -20,6 +20,14 @@
export default class GenericObjectRenderer {
renderUrl(url, title, text) {
return `<a href="${url}" title="${title}">${text}</a>`;
return `<a href="${url}" title="${this.escapeHtml(title)}">${this.escapeHtml(text)}</a>`;
}
escapeHtml(unsafe) {
return unsafe
.replaceAll("&", "&amp;")
.replaceAll("<", "&lt;")
.replaceAll(">", "&gt;")
.replaceAll('"', "&quot;")
.replaceAll("'", "&#039;");
};
}