Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d012f6a9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Sanitize Bluetooth device names without regex"

parents 8aa8b299 106cfbf9
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1025,7 +1025,11 @@ public final class BluetoothDevice implements Parcelable {
        try {
            String name = service.getRemoteName(this);
            if (name != null) {
                return name.replaceAll("[\\t\\n\\r]+", " ");
                // remove whitespace characters from the name
                return name
                        .replace('\t', ' ')
                        .replace('\n', ' ')
                        .replace('\r', ' ');
            }
            return null;
        } catch (RemoteException e) {