mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 20:25:45 +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