Could you please add .trim() to the FW alias network/host tokenizer?
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- [x ] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- [x ] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
Is your feature request related to a problem? Please describe.
The tokenizer is 'dumb' in a sense that it tokenizes any input even if it includes tabs/spaces but later throws validation errors on save.
Describe the solution you like
If the input is trimmed before it is tokenized, user experience will improve because we will no longer have to go back, search for invalid tokens, delete them, and re-add them w/o blank spaces.
Describe alternatives you considered
N/A
Additional context
N/A
bigger fish to fry, not a priority right now. In the long run we should likely replace the tokenizer, but I think I already explained that in your other ticket.
In which file could I add this myself?
this is the tokenizer we use https://dragonofmercy.github.io/Tokenize2/
Could you point me at the actual file in which you call the methods of the tokenizer class and feed them the contents of the contents box? I am not a web developer, and it will take me a very long time to reverse-engineer the web UI.