mirror of
https://github.com/pheralb/svgl.git
synced 2025-02-06 15:17:58 +08:00
⚙️ Remove special characters from SVG name in `svgr
` server file
This commit is contained in:
parent
054c1980c5
commit
7bcb167fb7
@ -29,7 +29,7 @@ export const POST = async ({ request }: RequestEvent) => {
|
|||||||
|
|
||||||
const svgCode = body.code;
|
const svgCode = body.code;
|
||||||
const typescript = body.typescript;
|
const typescript = body.typescript;
|
||||||
const name = body.name;
|
const name = body.name.replace(/[^a-zA-Z0-9]/g, '');
|
||||||
|
|
||||||
const jsCode = await transform(
|
const jsCode = await transform(
|
||||||
svgCode,
|
svgCode,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user