Skip to content

HTML Rendering issues with Mailable Notifications #55540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
karpadiem opened this issue Apr 24, 2025 · 3 comments
Closed

HTML Rendering issues with Mailable Notifications #55540

karpadiem opened this issue Apr 24, 2025 · 3 comments

Comments

@karpadiem
Copy link

Laravel Version

11.44.3,11.44.4

PHP Version

8.4.5

Database Driver & Version

No response

Description

I thought this might be a duplicate of #55528, however I have reduced my email notification down to a very simple mailable like so:

 public function toMail(object $notifiable): MailMessage
    {

        $url = url('/invite/'.$this->invite->id);
        return (new MailMessage)
            ->line('A new badge was created for you!')
            ->action('Click Here to Claim it!', $url);

    }

In both 11.44.3 and 11.44.4, the html render seems to break and looks like this:

Image

Reverting back to 11.44.2 fixes the email to look like this:

Image

Steps To Reproduce

Create a simple mailable notification in 11.44.3 or 11.44.4

@tormjens
Copy link

Can confirm I'm also seeing this in my apps with Laravel 11.44.4. Works again when reverting to 11.44.2.

@crynobone
Copy link
Member

11.44.5 has been released to revert the default. However, when dealing with markdown emails generated with generic user input values such as name, addresses etc, it is best to change the template and enable Illuminate\Mail\Markdown::withSecuredEncoding();; as {{ }} doesn't offer any protection against markdown texts

@nguillon
Copy link

Hi, issue still occurs with 11.44.5

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

No branches or pull requests

4 participants