Escape prompt manager names

This commit is contained in:
Cohee
2023-08-30 12:03:18 +03:00
parent 02c4ee12c4
commit 085e92a43e
2 changed files with 9 additions and 4 deletions

View File

@ -14,6 +14,10 @@ export const PAGINATION_TEMPLATE = '<%= rangeStart %>-<%= rangeEnd %> of <%= tot
*/
export const navigation_option = { none: 0, previous: 1, last: 2, };
export function escapeHtml(str) {
return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
}
/**
* Determines if a value is unique in an array.
* @param {any} value Current value.