Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
refactor(server/utils): re-export escape/unescape instead of wrapping them in function
Panagiotis Papadopoulosd71e127828f7
diff --git a/src/services/utils.ts b/src/services/utils.tsindex bc35fe10f2..ba97519652 100644--- a/src/services/utils.ts+++ b/src/services/utils.ts@@ -81,13 +81,9 @@ export function sanitizeSqlIdentifier(str: string) {return str.replace(/[^A-Za-z0-9_]/g, "");}-export function escapeHtml(str: string) {- return escape(str);-}+export const escapeHtml = escape;-export function unescapeHtml(str: string) {- return unescape(str);-}+export const unescapeHtml = unescape;export function toObject<T, K extends string | number | symbol, V>(array: T[], fn: (item: T) => [K, V]): Record<K, V> {const obj: Record<K, V> = {} as Record<K, V>; // TODO: unsafe?