From a880505859db8db556f2f920b89a026a0e3c2dff Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Sun, 29 Oct 2023 14:46:55 +0000 Subject: [PATCH] fix(removeScriptElement): remove link anchors with scripts (#1807) --- README.md | 2 +- plugins/removeScriptElement.js | 46 +++++++++++++++++++++++-- test/plugins/removeScriptElement.02.svg | 16 +++++++++ test/plugins/removeScriptElement.03.svg | 17 +++++++++ 4 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 test/plugins/removeScriptElement.02.svg create mode 100644 test/plugins/removeScriptElement.03.svg diff --git a/README.md b/README.md index 7536124e4..d6b9a4d8a 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,7 @@ const config = await loadConfig(configFile, cwd); | [removeNonInheritableGroupAttrs](https://github.com/svg/svgo/blob/main/plugins/removeNonInheritableGroupAttrs.js) | remove non-inheritable group's "presentation" attributes | Yes | | [removeOffCanvasPaths](https://github.com/svg/svgo/blob/main/plugins/removeOffCanvasPaths.js) | removes elements that are drawn outside of the viewbox | | | [removeRasterImages](https://github.com/svg/svgo/blob/main/plugins/removeRasterImages.js) | remove raster images | | -| [removeScriptElement](https://github.com/svg/svgo/blob/main/plugins/removeScriptElement.js) | remove `