forked from coracle/flotilla
Fix editing messages with html tags
This commit is contained in:
@@ -164,3 +164,11 @@ export const compressFile = async (
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export const escapeHtml = (html: string) => {
|
||||
const element = document.createElement("div")
|
||||
|
||||
element.innerText = html
|
||||
|
||||
return element.innerHTML
|
||||
}
|
||||
|
||||
@@ -26,3 +26,5 @@ export const buildUrl = (base: string | URL, ...pathname: string[]) => {
|
||||
|
||||
return url.toString()
|
||||
}
|
||||
|
||||
export const addPeriod = (s: string) => (s + ".").replace(/\.+$/, ".")
|
||||
|
||||
Reference in New Issue
Block a user