mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-18 12:14:41 -05:00
Trim before truncating "keword not found" message
This commit is contained in:
parent
680dccefea
commit
0e516a42e5
@ -400,7 +400,7 @@ class Monitor extends BeanModel {
|
|||||||
bean.msg += ", keyword is found";
|
bean.msg += ", keyword is found";
|
||||||
bean.status = UP;
|
bean.status = UP;
|
||||||
} else {
|
} else {
|
||||||
data = data.replace(/<[^>]*>?|[\n\r]|\s+/gm, " ");
|
data = data.replace(/<[^>]*>?|[\n\r]|\s+/gm, " ").trim();
|
||||||
if (data.length > 50) {
|
if (data.length > 50) {
|
||||||
data = data.substring(0, 47) + "...";
|
data = data.substring(0, 47) + "...";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user