*"Note the default functions <https://golang.org/pkg/text/template/#hdr-Functions> also provided by Go templating".* Have you tried the function "js"?
js Returns the escaped JavaScript equivalent of the textual representation of its arguments. -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/48434f56-097a-4f0a-8470-fdccbdb5568cn%40googlegroups.com.