luftdatenpumpe icon indicating copy to clipboard operation
luftdatenpumpe copied to clipboard

Math/TeX formula not rendered in Grafana dashboard

Open amotl opened this issue 5 years ago • 1 comments

This is just a reminder in order to properly document the GF_PANELS_DISABLE_SANITIZE_HTML=true setting.

The functionality is working OK, however the formula's are not getting rendered. As far as I could see the MathJax JS library is referenced in one of the HTML frames, but still the rendering is not occurring. Please advise.

You will find more details at https://source.irceline.be/corona-eu/luftdatenpumpe/issues/10.

amotl avatar Oct 29 '19 16:10 amotl

@wetterfrosch said about this:

Background

Finally I remember: There was a "sanitize_html"-feature enabled by default in transition to Grafana v6.0.0-beta1, see breaking changes in the changelog.

We have enable the disable_sanitize_html option in the [panels]-section of the grafana.ini configuration file or set the environment variable GF_PANELS_DISABLE_SANITIZE_HTML=true. Beware: This allows some vectors for cross-site-scripting-attacks.

Solution

[panels]
# If set to true Grafana will allow script tags in text panels. Not recommended as it enable XSS vulnerabilities.
disable_sanitize_html = true

References

  • https://github.com/grafana/grafana/issues/15195
  • https://github.com/grafana/grafana/issues/15647
  • https://community.grafana.com/t/release-notes-v6-0-x/14010

amotl avatar Oct 29 '19 16:10 amotl