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

Data sanitisation in input forms #68

Open
tigert opened this issue Nov 2, 2024 · 1 comment
Open

Data sanitisation in input forms #68

tigert opened this issue Nov 2, 2024 · 1 comment

Comments

@tigert
Copy link

tigert commented Nov 2, 2024

We need to come up with a list of allowed characters for input fields.

image

Here is my immediate thought, lets see if there are cases that need to be taken into account.

  • The language used in all hubhop content is English, so no accented characters should be allowed. Prefer sentence case in examples and docs to encourage new content to be easier to read

  • Vendor, aircraft, system names: Lower and upper case letters A-Z, numbers 0-9 and space, dash (-), parentheses () and slash (/), hash (#)

  • System: only editable by moderators, otherwise same as above

  • Input/Output type: same as above, but only selection, no editing

  • Preset name: Same as above, but allow also underscore (_)

    • Examples of valid names: VARIOMETER_RATE, Variometer rate, Alternator (left), Starter (Engine #2)
  • MSFS RPN code: A-Z, a-z, 0-9, +, -, _, /, *, %, =, !, <, >, ?, &, , |, ^, ~, [, ], (, ), {, }

  • X-plane datarefs: A-Z, a-z, 0-9, /, -, _,

Edit: added parentheses, not sure if [ and ] and { and } are used but its not like they would be a huge issue either.

@JaimeLeon2
Copy link

JaimeLeon2 commented Nov 2, 2024

Why do you need underscore in event name labels? I don't see the purpose there. Underscores are not easier to read either. Hubhop already replaces spaces with underscores when generating the events.txt file.
Where are the "examples and docs" in Hubhop? I guess you refer to the Description field?
I think allowing underscores in the code field is an urgent fix needed. Without it, it is very difficult to enter new events into the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants