Correctly escape username pattern regex

Without the escaping, the backslash doesn't get renderet in the frontend
which leads to some browsers (chrome >= 114?) just allowing every input.
This commit is contained in:
Benjamin Neff 2023-06-05 23:35:31 +02:00
parent 5425f5cfa6
commit bb7e5a369d
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
2 changed files with 2 additions and 2 deletions

View file

@ -32,7 +32,7 @@
placeholder: t("registrations.new.username"),
title: t("registrations.new.enter_username"),
required: true,
pattern: "[A-Za-z0-9_.\-]+",
pattern: "[A-Za-z0-9_.\\-]+",
aria: {labelledby: "usernameLabel"}
- if mobile

View file

@ -19,7 +19,7 @@
placeholder: t("registrations.new.username"),
class: "input-block-level form-control",
required: true,
pattern: "[A-Za-z0-9_.@\-]+",
pattern: "[A-Za-z0-9_.@\\-]+",
autocapitalize: "none",
autocorrect: "off",
autofocus: true,