As per latest logic shared from browserstack team, below is the logic for sanitising project, build names and tags.
Anything except alphabets, numbers and hyphen (-), will be replaced with space (% 20) character.
Here is a test that shows how the expected string looks like with above rule.