From 8e29a97404ea0aa9b9b576656358c8c276b6f992 Mon Sep 17 00:00:00 2001 From: Corentin Thomasset Date: Fri, 22 Apr 2022 20:13:37 +0200 Subject: [PATCH] feat(new-tool): html entities escape/unescape --- src/tools/html-entities/html-entities.vue | 80 +++++++++++++++++++++++ src/tools/html-entities/index.ts | 11 ++++ src/tools/index.ts | 3 +- 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 src/tools/html-entities/html-entities.vue create mode 100644 src/tools/html-entities/index.ts diff --git a/src/tools/html-entities/html-entities.vue b/src/tools/html-entities/html-entities.vue new file mode 100644 index 00000000..3fd37483 --- /dev/null +++ b/src/tools/html-entities/html-entities.vue @@ -0,0 +1,80 @@ + + + + \ No newline at end of file diff --git a/src/tools/html-entities/index.ts b/src/tools/html-entities/index.ts new file mode 100644 index 00000000..530b6744 --- /dev/null +++ b/src/tools/html-entities/index.ts @@ -0,0 +1,11 @@ +import { Code } from '@vicons/tabler'; +import type { ITool } from './../Tool'; + +export const tool: ITool = { + name: 'Escape html entities', + path: '/html-entities', + description: 'Escape or unescape html entities (replace <,>, &, " and \' to their html version)', + keywords: ['html', 'entities', 'escape', 'unescape', 'special', 'characters', 'tags'], + component: () => import('./html-entities.vue'), + icon: Code, +}; \ No newline at end of file diff --git a/src/tools/index.ts b/src/tools/index.ts index f46f7843..cded17a3 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -1,6 +1,7 @@ import { LockOpen } from '@vicons/tabler'; import type { ToolCategory } from './Tool'; +import { tool as htmlEntities } from './html-entities'; import { tool as urlParser } from './url-parser'; import { tool as deviceInformation } from './device-information'; import { tool as bcrypt } from './bcrypt'; @@ -37,7 +38,7 @@ export const toolsByCategory: ToolCategory[] = [ { name: 'Web', icon: LockOpen, - components: [urlEncoder, qrCodeGenerator, urlParser, deviceInformation], + components: [urlEncoder, htmlEntities, qrCodeGenerator, urlParser, deviceInformation], }, { name: 'Development',