summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormarcin mikołajczak <git@mkljczk.pl>2024-07-28 13:44:17 +0200
committermarcin mikołajczak <git@mkljczk.pl>2024-07-28 13:44:17 +0200
commita40bf5d24fb75b246b9e11908b24cdcedabcb3af (patch)
treef15627b680f1c2ee473286e7e816e18d2fbff057 /lib
parentad8c26f6c285412be041b7dcaeefa8741d3a6e57 (diff)
downloadpleroma-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.ex2
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