play-bootstrap icon indicating copy to clipboard operation
play-bootstrap copied to clipboard

Option to handle translated strings as HTML

Open alexdarling opened this issue 3 years ago • 0 comments

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?

alexdarling avatar Jan 26 '22 19:01 alexdarling