fix(email): encode Cyrillic binaries with /utf8.
OTP truncates non-ASCII in <<"...">> to 8-bit bytes, garbling Russian in mail and in-app notification copy.
This commit is contained in:
@@ -91,9 +91,13 @@ test_deliver_error() ->
|
||||
test_template_fill() ->
|
||||
{Sub, Plain, Html} = logic_email_templates:render(verify, <<"https://x/verify?token=z">>),
|
||||
?assert(binary:match(Sub, <<"CalenTIQ">>) =/= nomatch),
|
||||
%% OTP truncates Cyrillic in <<"...">> without /utf8 — guard real UTF-8 text
|
||||
?assert(binary:match(Sub, <<"подтвердите"/utf8>>) =/= nomatch),
|
||||
?assert(binary:match(Plain, <<"Подтвердите"/utf8>>) =/= nomatch),
|
||||
?assert(binary:match(Plain, <<"https://x/verify?token=z">>) =/= nomatch),
|
||||
?assert(binary:match(Html, <<"{{">>) =:= nomatch),
|
||||
?assert(binary:match(Html, <<"https://x/verify?token=z">>) =/= nomatch).
|
||||
?assert(binary:match(Html, <<"https://x/verify?token=z">>) =/= nomatch),
|
||||
?assert(binary:match(Html, <<"Подтвердите"/utf8>>) =/= nomatch).
|
||||
|
||||
test_reminder_deliver() ->
|
||||
Self = self(),
|
||||
|
||||
Reference in New Issue
Block a user