diff options
author | marcin mikołajczak <git@mkljczk.pl> | 2024-07-28 13:44:17 +0200 |
---|---|---|
committer | marcin mikołajczak <git@mkljczk.pl> | 2024-07-28 13:44:17 +0200 |
commit | a40bf5d24fb75b246b9e11908b24cdcedabcb3af (patch) | |
tree | f15627b680f1c2ee473286e7e816e18d2fbff057 /lib | |
parent | ad8c26f6c285412be041b7dcaeefa8741d3a6e57 (diff) | |
download | pleroma-a40bf5d24fb75b246b9e11908b24cdcedabcb3af.tar.gz pleroma-a40bf5d24fb75b246b9e11908b24cdcedabcb3af.zip |
Fix good_locale_code?/1 regex
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/ecto_type/activity_pub/object_validators/language_code.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/ecto_type/activity_pub/object_validators/language_code.ex b/lib/pleroma/ecto_type/activity_pub/object_validators/language_code.ex index 3135af1fa..4779deeb0 100644 --- a/lib/pleroma/ecto_type/activity_pub/object_validators/language_code.ex +++ b/lib/pleroma/ecto_type/activity_pub/object_validators/language_code.ex @@ -21,7 +21,7 @@ defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.LanguageCode do def load(data), do: {:ok, data} - def good_locale_code?(code) when is_binary(code), do: code =~ ~r<^[a-zA-Z0-9\-]+$> + def good_locale_code?(code) when is_binary(code), do: code =~ ~r<^[a-zA-Z0-9\-]+\z$> def good_locale_code?(_code), do: false end |