mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add string quote func
This commit is contained in:
parent
bba92c0746
commit
70b23ab73b
@ -3,6 +3,7 @@ package notifiers
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/grafana/pkg/bus"
|
||||
"github.com/grafana/grafana/pkg/components/simplejson"
|
||||
@ -99,8 +100,8 @@ func (this *DingDingNotifier) Notify(evalContext *alerting.EvalContext) error {
|
||||
bodyStr = `{
|
||||
"msgtype": "actionCard",
|
||||
"actionCard": {
|
||||
"text": "` + message + `",
|
||||
"title": "` + title + `",
|
||||
"text": "` + strings.Replace(message, `"`, "'", -1) + `",
|
||||
"title": "` + strings.Replace(title, `"`, "'", -1) + `",
|
||||
"singleTitle": "More",
|
||||
"singleURL": "` + messageUrl + `"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user