mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-18 08:43:57 +00:00
fix: eslint fix
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
function removeZalgoText(text: string): string {
|
||||
// eslint-disable-next-line no-misleading-character-class
|
||||
const zalgoRegex =
|
||||
// eslint-disable-next-line no-misleading-character-class
|
||||
/[\u0300-\u036F\u1AB0-\u1AFF\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/g;
|
||||
|
||||
return text.replace(zalgoRegex, "");
|
||||
@@ -8,14 +8,14 @@ function removeZalgoText(text: string): string {
|
||||
|
||||
function decodeHtmlEntities(text: string): string {
|
||||
const entityMap: { [key: string]: string } = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
''': "'",
|
||||
' ': ' ',
|
||||
"&": "&",
|
||||
"<": "<",
|
||||
">": ">",
|
||||
""": '"',
|
||||
"'": "'",
|
||||
" ": " ",
|
||||
};
|
||||
|
||||
|
||||
return text.replace(/&[#\w]+;/g, (entity) => {
|
||||
return entityMap[entity] || entity;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user