mirror of
https://github.com/pheralb/svgl.git
synced 2025-02-06 06:58:04 +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 typescript = body.typescript;
|
||||
const name = body.name;
|
||||
const name = body.name.replace(/[^a-zA-Z0-9]/g, '');
|
||||
|
||||
const jsCode = await transform(
|
||||
svgCode,
|
||||
@ -48,4 +48,4 @@ export const POST = async ({ request }: RequestEvent) => {
|
||||
{ status: 500 }
|
||||
);
|
||||
}
|
||||
};
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user