[11.x] Fix EncodedHtmlString to ignore instance of HtmlString#55543
Conversation
avoid double encoding Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
|
@jbraband I made some changes to how we solve this. Also add some integration tests to cover this usage |
|
|
||
| if ($value instanceof BackedEnum) { | ||
| $value = $value->value; | ||
| } |
There was a problem hiding this comment.
Copy the logic from e() function
framework/src/Illuminate/Support/helpers.php
Lines 127 to 142 in 18a2f33
|
@crynobone I'm not at a computer at the moment, but one of the other templates in the mail folder had the parse method with the unescaped blade {!! !!} |
It's panel.blade.php @crynobone |
Was able to commit it from mobile |
|
I'll look to add a test for panel in the morning (CST) |
EncodedHtmlString to ignore instance of HtmlString
|
Thanks @crynobone! 🎉 |

I do not see existing tests for the sub-mail components (header, footer, table, etc) and so are excluded from this PR. The related PR #55149 also do not contain tests for similar changes to button, header, layout, message, and panel.
After updating to Laravel 11.44.3 yesterday, the mail components started rendering escaped HTML. Note that some mail components were fixed by @crynobone in #55149.
Here is a sample markdown template that demonstrates the 3 mail components included in this PR, subcopy, table, and footer
The resulting rendered mailable.
Note: the closing
}seen at the end of the sub-copy in the image has already been fixed by @crynobone in #55530 and is waiting for release next weekI am happy to makes changes or additions.