linebreaksbr
Convert all newlines in a piece of plain text to HTML line breaks (< br >).
def linebreaksbr(
value: string,
autoescape: boolean = True
) - > string
Convert all newlines in a piece of plain text to HTML line breaks (< br >).
Parameters
| Name | Type | Description |
|---|---|---|
| value | string | The plain text content containing newlines to be converted. |
| autoescape | boolean = True | Determines whether the input text should be HTML-escaped before inserting line breaks to prevent XSS vulnerabilities. |
Returns
| Type | Description |
|---|---|
string | The input text with newline characters replaced by HTML < br > tags, marked as safe for HTML output. |