mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-20 21:25:47 +01:00
Merge pull request #4160 from quacksouls/cct-name
CCT: no special characters in file names of Coding Contracts
This commit is contained in:
commit
a1df9db493
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user