Open
Description
Laravel Version
12
PHP Version
8.4
Database Driver & Version
N/A
Description
Hi,
We are finding that variables echoed into Markdown Mailables are not having the Apostrophe character escaped. This has created some confusion in tests because assertSeeInHtml
does escape the Apostrophe character.
Is this expected behaviour?
Steps To Reproduce
-
Create a new Laravel 12 installation.
-
Create a Markdown Mailable, e.g:
php artisan make:mail EscapeTest --markdown=mail.escape-test
- In the markdown file, echo some characters that you would expect to be escaped, including the Apostrophe:
<x-mail::message>
{{ "<script ' &" }}
</x-mail::message>
- Return the mailable from the
/
web route for testing:
Route::get('/', function () {
return new \App\Mail\EscapeTest;
});
- Navigate to the website in the browser and observe in Dev Tools that the Apostrophe character is not escaped, while the other characters are: