forked from GithubBackups/healthchecks
Escape asterisks in Slack messages. Fixes #223
This commit is contained in:
parent
63b15d74a5
commit
15a853bd8a
@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
- Fix refreshing of the checks page filtered by tags (#221)
|
- Fix refreshing of the checks page filtered by tags (#221)
|
||||||
|
- Escape asterisks in Slack messages (#223)
|
||||||
|
|
||||||
|
|
||||||
## 1.5.0 - 2019-02-04
|
## 1.5.0 - 2019-02-04
|
||||||
|
@ -114,3 +114,10 @@ def break_underscore(s):
|
|||||||
s = s.replace("_", "_\u200b")
|
s = s.replace("_", "_\u200b")
|
||||||
|
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
|
||||||
|
@register.filter
|
||||||
|
def fix_asterisks(s):
|
||||||
|
""" Prepend asterisks with "Combining Grapheme Joiner" characters. """
|
||||||
|
|
||||||
|
return s.replace("*", "\u034f*")
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
},
|
},
|
||||||
{% elif check.kind == "cron" %}
|
{% elif check.kind == "cron" %}
|
||||||
{"title": "Schedule",
|
{"title": "Schedule",
|
||||||
"value": "{{ check.schedule|escapejs }}",
|
"value": "{{ check.schedule|fix_asterisks|escapejs }}",
|
||||||
"short": true
|
"short": true
|
||||||
},
|
},
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user