truncatechars_html
Truncate HTML after arg number of chars. Preserve newlines in the HTML.
def truncatechars_html(
value: string,
arg: integer
) - > string
Truncate HTML after arg number of chars. Preserve newlines in the HTML.
Parameters
| Name | Type | Description |
|---|---|---|
| value | string | The HTML content or string to be truncated. |
| arg | integer | The maximum number of characters to display before truncation occurs. |
Returns
| Type | Description |
|---|---|
string | The truncated HTML string with tags properly closed and newlines preserved, or the original value if the argument is invalid. |