mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-22 10:46:19 +01:00
api/utils/cleanString: add more forbidden chars
This commit is contained in:
parent
da5cd3e324
commit
6a430545d2
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
const forbiddenCharsString = ['}', '{', '%', '>', '<', '^', ';', '`', '$', '"', "@", '='];
|
||||
const forbiddenCharsString = ['}', '{', '%', '>', '<', '^', ';', ':', '`', '$', '"', "@", '=', '?', '|', '*'];
|
||||
|
||||
export function metadataManager(obj) {
|
||||
const keys = Object.keys(obj);
|
||||
|
@ -21,7 +21,7 @@ export function metadataManager(obj) {
|
|||
|
||||
export function cleanString(string) {
|
||||
for (const i in forbiddenCharsString) {
|
||||
string = string.replaceAll("/", "_")
|
||||
string = string.replaceAll("/", "_").replaceAll("\\", "_")
|
||||
.replaceAll(forbiddenCharsString[i], '')
|
||||
}
|
||||
return string;
|
||||
|
|
Loading…
Reference in a new issue