Skip to content
This repository was archived by the owner on Jul 4, 2024. It is now read-only.

Commit 390fbe3

Browse files
authored
added regex
1 parent 7a1ef6f commit 390fbe3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ module.exports = (req,res) => {
33
.toString(36)
44
.replace(".", "");
55
const moreRandomStr = Math.random(randomStr).toString(36);
6-
const ultraRandomStr = Math.random(moreRandomStr).toString(36);
6+
const ultraRandomStr = Math.random(moreRandomStr).toString(36).replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\]\\]/gi, "");
77
res.send(`${ultraRandomStr}`);
8-
};
8+
};

0 commit comments

Comments
 (0)