Fix modal URL field autofill allowing invalid characters (#790)

Closes #785
This commit is contained in:
jade 2022-12-06 17:13:18 -06:00 committed by GitHub
parent 050f8f3c81
commit 1a922d41df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -221,7 +221,10 @@ Questions? [Join the Modrinth Discord for support!](https://discord.gg/EUHuJHt)`
},
updatedName() {
if (!this.manualSlug) {
this.slug = this.name.toLowerCase().replaceAll(' ', '-')
this.slug = this.name
.toLowerCase()
.replaceAll(' ', '-')
.replaceAll(/[^a-zA-Z0-9!@$()`.+,_"-]/g, '')
}
},
},