Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patterns are too restrictive for names of projects/workflowitems SP1 #1202

Closed
1 task done
georgimld opened this issue Jun 22, 2022 · 1 comment · Fixed by #1208 or #1211
Closed
1 task done

Patterns are too restrictive for names of projects/workflowitems SP1 #1202

georgimld opened this issue Jun 22, 2022 · 1 comment · Fixed by #1208 or #1211
Assignees
Labels
api Indicates api related issue or feature bug Something isn't working frontend Indicates frontend related issue or feature

Comments

@georgimld
Copy link
Collaborator

  • I have searched the issues of this repository and believe that this is not a duplicate.

Description 😯

the pattern for displayName in project and workflowitem (and probably also subproject) is too restrictive.
In particular, some orthographic characters are missing, such as:

  • the en dash (–),
  • orthographic quotation marks (»«„“”''''), but also
  • the space without a break (  in HTML).

Possibly a Unicode RegExp could help here, e.g.: /^([\p{L}\p{N}\p{P}\p{M}\p{S}\p{Zs}]*)$/ and This would also be helpful to be able to use TruBudget with other writing systems (Arabic, Hebrew, Amharic, Farsi, ...) that are covered by these Unicode classes.

How to reproduce 🕹

Try to create a project or workflowitem with the above mentioned characters

Your Environment 🌎

Tech Version
TruBudget v2.0.0
@georgimld georgimld added bug Something isn't working api Indicates api related issue or feature frontend Indicates frontend related issue or feature labels Jun 22, 2022
@georgimld georgimld added this to the Trubudget 2.1.0 milestone Jun 22, 2022
@Stezido Stezido changed the title Patterns are too restrictive for names of projects/workflowitems Patterns are too restrictive for names of projects/workflowitems SP1 Jun 22, 2022
@Stezido Stezido self-assigned this Jun 22, 2022
@schoel-bis
Copy link

The Regexp that you eventually came up with has at least one issue: It exludes the Ps and Pe classes and all the various types of braces and brackets are part of these. Some bracket types were included in the previous Regexp, e.g. () and [].

Second, I wonder what the idea behind this Regexp is in the first place. If it is meant to sanitize things or consumption in HTML (although I hope it is not), then please note that <> are included in the S (more specifically: Sm) class and & is in Po, both of which are allowed by the Regexp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Indicates api related issue or feature bug Something isn't working frontend Indicates frontend related issue or feature
Projects
None yet
3 participants