Merge pull request #4160 from quacksouls/cct-name

CCT: no special characters in file names of Coding Contracts
This commit is contained in:
hydroflame 2022-09-27 17:50:08 -03:00 committed by GitHub
commit a1df9db493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -191,7 +191,8 @@ function getRandomFilename(server: BaseServer, reward: ICodingContractReward): s
} }
if (reward.name) { if (reward.name) {
contractFn += `-${reward.name.replace(/\s/g, "")}`; // Only alphanumeric characters in the reward name.
contractFn += `-${reward.name.replace(/[^a-zA-Z0-9]/g, "")}`;
} }
return contractFn; return contractFn;