Skip to content

Commit

Permalink
fix: remove non-ASCII characters from domain words
Browse files Browse the repository at this point in the history
  • Loading branch information
schw4rzlicht committed Nov 4, 2022
1 parent 1452a59 commit 5f465db
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/locales/en/word/noun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3244,7 +3244,6 @@ export default [
'jaguar',
'jail',
'jailhouse',
'jalapeño',
'jam',
'jar',
'jasmine',
Expand Down
2 changes: 1 addition & 1 deletion src/modules/internet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export class InternetModule {
*/
domainWord(): string {
return `${this.faker.word.adjective()}-${this.faker.word.noun()}`
.replace(/([\\~#&*{}/:<>?|\"'])/gi, '')
.replace(/([^a-z0-9-])/gi, '')
.replace(/\s/g, '-')
.replace(/-{2,}/g, '-')
.toLowerCase();
Expand Down

0 comments on commit 5f465db

Please sign in to comment.