Aliases: fix URL regex

This commit is contained in:
Alex Gleason 2020-10-08 16:33:47 -05:00
parent a3964b373e
commit 5ec7d88b77
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 2 deletions

View File

@ -51,8 +51,7 @@ defmodule Pleroma.User do
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
@email_regex ~r/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
@url_regex ~r/https?:\/\/[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)/
@url_regex ~r/^https?:\/\/[^\s]{1,256}$/
@strict_local_nickname_regex ~r/^[a-zA-Z\d]+$/
@extended_local_nickname_regex ~r/^[a-zA-Z\d_-]+$/