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

Rendering HTML in alert attributes #535

Open
2bithacker opened this issue Aug 24, 2022 · 0 comments
Open

Rendering HTML in alert attributes #535

2bithacker opened this issue Aug 24, 2022 · 0 comments

Comments

@2bithacker
Copy link

2bithacker commented Aug 24, 2022

Issue Summary
In earlier versions of Alerta, we were able to use HTML to mark up text in custom attributes, however in the most recent alerta-webui, these attributes get displayed without rendering.

Environment

  • OS: Linux

  • API version: 8.7.0

  • Deployment: Docker

  • For self-hosted, WSGI environment: nginx/gunicorn

  • Database: Postgres

  • Server config:
    Auth enabled? Yes
    Auth provider? OpenID
    Customer views? No
    (or provide the /config endpoint output)

  • web UI version: 8.7.0

  • CLI version: 8.5.1

To Reproduce
Steps to reproduce the behavior:

  1. send an alert with an attribute containing HTML, such as alerta send -A diff="<pre>diff text</pre>"
  2. Go to web UI and look at the alert
  3. See that the attribute displays "<pre>diff text</pre>" rather than rendering diff text in a fixed-width font

For web app issues, include any web browser JavaScript console errors.

Expected behavior
The attribute to display diff text in a fixed-width font (due to the <pre> tag.)

This worked in older versions of Alerta, such as 6.5.0.

Additional context
I have a PR to submit to address this issue.

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