1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-29 03:55:49 +01:00

Do not remove newline and whitespace characters from notification content

This commit is contained in:
José Rebelo 2022-08-25 14:14:08 +01:00 committed by Gitea
parent a02d54523a
commit 5920b26aab

View File

@ -591,9 +591,10 @@ public class NotificationListener extends NotificationListenerService {
}
}
// Strip Unicode control sequences: some apps like Telegram add a lot of them for unknown reasons
// Strip Unicode control sequences: some apps like Telegram add a lot of them for unknown reasons.
// Keep newline and whitespace characters
private String sanitizeUnicode(String orig) {
return orig.replaceAll("\\p{C}", "");
return orig.replaceAll("[\\p{C}&&\\S]", "");
}
private void dissectNotificationTo(Notification notification, NotificationSpec notificationSpec,