Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to handle translated strings as HTML #135

Open
alexdarling opened this issue Jan 26, 2022 · 0 comments
Open

Option to handle translated strings as HTML #135

alexdarling opened this issue Jan 26, 2022 · 0 comments

Comments

@alexdarling
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant