Skip to content

random.word() can return undesirable non-alpha characters #113

Closed
@griest024

Description

@griest024

Describe the bug

The pool of strings from which random.words() pulls values includes strings that have parentheses, e.g. Cocos (Keeling) Islands and Killer Whale (Orca). This can result in (Keeling) and (Orca) being returned.

There's a larger problem here of non-alphabetic characters being returned in words. Obviously some non-alpha characters are desired in words, e.g. -, but some are not. We should decide on the set of acceptable characters that word() can return and regex the others out.

Reproduction

Mock faker.fake with the above mentioned values and you can see the bad returns.

Additional Info

Metadata

Metadata

Labels

c: bugSomething isn't workingp: 1-normalNothing urgents: acceptedAccepted feature / Confirmed bug

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions