Skip to content

Option to handle translated strings as HTML #135

@alexdarling

Description

@alexdarling

When setting errors on a form, HTML characters are escaped, which means errors messages can't have formatting:

@b4.textarea(
    input.form("myTestArea"),
    Symbol("rows") -> 8,
    Symbol("_error") -> "I am an error message with <strong>HTML tags</strong>!")

image

The accepted types for _error don't include an Html object, so wrapping this in @Html() isn't legal.

Is there a workaround in order to add HTML tags to error messages and/or would it be possible to add Html as a valid input type to _error special args?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions