mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 04:35:46 +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) {
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user