-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
The Asset Notes field included in the Upcoming Audit Email is a multi-line text field. Hence there is a high chance of having a line break in this field.
Currently, the asset notes are passed as it is in the blade templates to the markdown format, which leads to broken HTML table in the final email, when there are line breaks.
Vibe coding with GIthub copilot shows that we can use $escaped_notes = nl2br(e($asset->notes)); to convert the new lines in the asset notes to <br> tag, which is one of the known ways to manage multi-line cells in markdown tables.
Copilot also told to use {!! $escaped_notes !!} while inserting it in the table to escape HTML tags.
While trying to understand the code, it told about XSS vulnerabilities. So I let the professionals deal with the right way of working.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
