Fix RegExp

This commit is contained in:
KoalaSat 2024-06-25 18:21:07 +02:00
parent b76d40a087
commit 17a077b5a0
No known key found for this signature in database
GPG Key ID: 2F7F61C6146AB157

View File

@ -14,7 +14,7 @@ const SettingsPage = (): JSX.Element => {
const [newUrl, setNewUrl] = useState<string>('');
const [error, setError] = useState<string>();
// Regular expression to match a valid .onion URL
const onionUrlPattern = /^(http:\/\/|https:\/\/)?[a-zA-Z2-7]{16,56}\.onion$/;
const onionUrlPattern = /^(http:\/\/|https:\/\/)[a-zA-Z2-7]{16,56}\.onion$/;
const addCoordinator = () => {
if (federation.coordinators[newAlias]) {