Skip to content

Fix: Allow newlines in SMS OTP templatefix: allow newlines in SMS OTP template#2594

Open
amulya-18 wants to merge 1 commit into
supabase:masterfrom
amulya-18:fix/sms-otp-newlines
Open

Fix: Allow newlines in SMS OTP templatefix: allow newlines in SMS OTP template#2594
amulya-18 wants to merge 1 commit into
supabase:masterfrom
amulya-18:fix/sms-otp-newlines

Conversation

@amulya-18

@amulya-18 amulya-18 commented Jun 25, 2026

Copy link
Copy Markdown

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

SMS OTP templates do not correctly render newline characters (\n).
Instead of creating a new line, the literal string \n appears in the message.

What is the new behavior?

Escaped newline characters (\\n) are converted into actual newline characters (\n) when generating the SMS message.
This allows multi-line SMS OTP templates to render correctly.

Additional context

This change is implemented in generateSMSFromTemplate by replacing escaped newline sequences with actual newline characters before returning the final message.

@amulya-18 amulya-18 requested a review from a team as a code owner June 25, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant