[BUG] Item name regex validation does not allow NBSP characters and other special white space elements
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
The item name regex is defined as `^\S+( \S+)*$` which allows any amount of words separated by spaces (only regular spaces).
if using `NBSP` non-breaking spaces it will fail.
When creating links the title of pages may contain other types of whitespace as only standard spaces, so it will fail with a nasty error message.
### Solution
1. Remove the regex as it does not provide a lot of safety anyway...
2. Sanitize the strings we get from page titles for links to avoid the validation issue. (this will only push back the problem)
3. allow any type of white space instead of only spaces by replacing `^\S+( \S+)*$` with `^\S+(\s\S+)*$` (this also allows tabs and carriage returns).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.