Skip to content

Commit

Permalink
Escape SLA status text for compatibility with notification services s…
Browse files Browse the repository at this point in the history
…uch as Lark
  • Loading branch information
samanhappy committed Jan 11, 2024
1 parent 5dbb97a commit db43344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion report/sla.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ func SLALarkSection(r *probe.Result) string {
},`
return fmt.Sprintf(text, r.Name, r.Endpoint,
DurationStr(r.Stat.UpTime), DurationStr(r.Stat.DownTime), r.SLAPercent(),
r.Stat.Total, SLAStatusText(r.Stat, Lark),
r.Stat.Total, JSONEscape(SLAStatusText(r.Stat, Lark)),
FormatTime(r.StartTime),
r.Status.Emoji()+" "+r.Status.String(), JSONEscape(r.Message))
}
Expand Down

0 comments on commit db43344

Please sign in to comment.