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

View File

@@ -191,7 +191,8 @@ function getRandomFilename(server: BaseServer, reward: ICodingContractReward): s
}
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;