earthobservations / luftdatenpumpe

Acquire and process live and historical air quality data without efforts. Filter by station-id, sensor-id and sensor-type, apply reverse geocoding, store into time-series and RDBMS databases, publish to MQTT, output as JSON, or visualize in Grafana. Data sources: Sensor.Community (luftdaten.info), IRCELINE, and OpenAQ.
https://luftdatenpumpe.readthedocs.io/
GNU Affero General Public License v3.0
35 stars 3 forks source link

Math/TeX formula not rendered in Grafana dashboard #13

Open amotl opened 5 years ago

amotl commented 5 years ago

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 commented 5 years ago

@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