Replace in Message Templates

When using Message Templates for alerts, is it possible to replace all whitespaces of a field with another character?
I tried with strings.ReplaceAll, but it seems not to know the function.
{{ index .Labels "message" | replaceAll " " "%20"}}

This would be useful to create URLs.
For example for silences:
http://grafana.local/alerting/silence/new?matcher=message%3D{{ index .Labels "message" | ReplaceAll " " "%20"}}

You’re almost there! Try to use reReplaceAll as elaborated here:

For example, we have an alert that generates a dashboard link based on the alert’s labels:
http://grafana.example.com/d/dashb0ardID/dashboardname&var={{ reReplaceAll " " "%20" $labels.varname}}