mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-29 18:50:39 +00:00
Merge pull request #3054 from TechWilk/keyword-not-found-whitespace
Trim before truncating "keword not found" message
This commit is contained in:
commit
8d24891b8e
1 changed files with 1 additions and 1 deletions
|
@ -400,7 +400,7 @@ class Monitor extends BeanModel {
|
|||
bean.msg += ", keyword is found";
|
||||
bean.status = UP;
|
||||
} else {
|
||||
data = data.replace(/<[^>]*>?|[\n\r]|\s+/gm, " ");
|
||||
data = data.replace(/<[^>]*>?|[\n\r]|\s+/gm, " ").trim();
|
||||
if (data.length > 50) {
|
||||
data = data.substring(0, 47) + "...";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue