Framework: mail::button component is not rendered correctly inside mail:message with indention.

Created on 5 Sep 2017  路  6Comments  路  Source: laravel/framework

  • Laravel Version: 5.5.1
  • PHP Version: v7.1.8
  • Database Driver & Version: MariaDb 10.2.7

Description:

mail::button component inside mail::message with additional elements renders inside the <pre> tag without closing </table>. It only happens when elements inside mail::message are indented like so.

@component('mail::message')
    # Introduction

    The body of your message.

    @component('mail::button', ['url' => ''])
        Button Text
    @endcomponent

    Thanks,<br>
    {{ config('app.name') }}
@endcomponent

if everything is without indention like so:

@component('mail::message')
# Introduction

The body of your message.

@component('mail::button', ['url' => ''])
Button Text
@endcomponent

Thanks,<br>
{{ config('app.name') }}
@endcomponent

it renders all components without an issue.

Most helpful comment

All 6 comments

Can confirm. Experiencing this since with 5.5.3

screenshot from 2017-09-12 11-10-342

@themsaid solved my issue right away. I don't understand why you have 3 thumbs down made sense to me straight away as I tabbed the contents of the mailable. Removed the tabs and hey presto!!!!

@asolopovas oh i see lol

@asolopovas
mail button is still not working in laravel email

@themsaid The problem is always present
As you add a button in the middle of component, the p tag is open and closed before the table for the button but after the button, he is not reoppen. (the text is just added after the tag
image

Was this page helpful?
0 / 5 - 0 ratings