mirror of
https://github.com/immich-app/immich.git
synced 2025-01-10 13:56:47 +01:00
8bf571bf48
* feat(web): ask user before going to newly created album * feat(web): add button option to notification cards * feat(web): allow html messages in notification cards * show album -> view album * remove 'link' action from notifications * remove unused type
16 lines
450 B
TypeScript
16 lines
450 B
TypeScript
export const removeAccents = (str: string) => {
|
|
return str.normalize('NFD').replaceAll(/[\u0300-\u036F]/g, '');
|
|
};
|
|
|
|
export const normalizeSearchString = (str: string) => {
|
|
return removeAccents(str.toLocaleLowerCase());
|
|
};
|
|
|
|
export const encodeHTMLSpecialChars = (str: string) => {
|
|
return str
|
|
.replaceAll('&', '&')
|
|
.replaceAll('<', '<')
|
|
.replaceAll('>', '>')
|
|
.replaceAll('"', '"')
|
|
.replaceAll("'", ''');
|
|
};
|