framework icon indicating copy to clipboard operation
framework copied to clipboard

Apostrophe in Maillable::assertSeeInHtml() not escaped properly

Open raveren opened this issue 6 months ago • 1 comments

Laravel Version

11.45.0

PHP Version

8.3

Database Driver & Version

No response

Description

The exact example in PR that fixed this three years ago is broken again since the single apostrophe was not covered in the tests:

Steps To Reproduce

The mailable blade:

{{ "O'Connor" }}

The test assertion (which fails)

$mail->assertSeeInHtml("O'Connor");

Test output:

Failed asserting that 'O'Connor\n
' [ASCII](length: 14) contains "O'Connor" [ASCII](length: 8).

Also related to a fairly recently reported bug: https://github.com/laravel/framework/issues/54830

raveren avatar Jun 03 '25 09:06 raveren

Hey there, thanks for reporting this issue.

We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here?

Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.

laravel new bug-report --github="--public"

Do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue.

Thanks!

crynobone avatar Jun 03 '25 11:06 crynobone

Hey there,

We're closing this issue because it's inactive, already solved, old, or not relevant anymore. Feel free to open up a new issue if you're still experiencing this problem.

crynobone avatar Jul 01 '25 11:07 crynobone

Well I finally found time and motivation for this and now I find out that you conveniently skipped the part where I also have to create a gh repository for this as well??

That's an unreasonable amount of figuring out and manual work, man.

Yeah, I'll just fix my flaky test another way, thanks.

raveren avatar Jul 11 '25 08:07 raveren