Skip to content

Data sanitisation in input forms #68

Description

@tigert

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions