mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-02-04 04:54:10 +01:00
Do not remove newline and whitespace characters from notification content
This commit is contained in:
parent
a02d54523a
commit
5920b26aab
@ -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) {
|
private String sanitizeUnicode(String orig) {
|
||||||
return orig.replaceAll("\\p{C}", "");
|
return orig.replaceAll("[\\p{C}&&\\S]", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dissectNotificationTo(Notification notification, NotificationSpec notificationSpec,
|
private void dissectNotificationTo(Notification notification, NotificationSpec notificationSpec,
|
||||||
|
Loading…
Reference in New Issue
Block a user