Add feedback dialog for cloud dashboard (#293)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
export function escapeHtml(input: string) {
|
||||
return input
|
||||
.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/"/g, """)
|
||||
.replace(/'/g, "'");
|
||||
}
|
||||
|
||||
export function toPlainHtml(text: string) {
|
||||
return `<pre style="font-family: inherit; white-space: pre-wrap; margin: 0;">${escapeHtml(text)}</pre>`;
|
||||
}
|
||||
Reference in New Issue
Block a user