BelledonneCommunications / linphone-desktop

Linphone is a free VoIP and video softphone based on the SIP protocol. Mirror of git://git.linphone.org/linphone-desktop.git
https://linphone.org/
GNU General Public License v3.0
391 stars 200 forks source link

[Bug]: Linphone does not filter line breaks from copy-pasted phone numbers #808

Open ColinFinck opened 5 months ago

ColinFinck commented 5 months ago

Context

I often copy-paste telephone numbers from other applications to the Linphone phone number field. Linphone already does a good job at filtering out undialable characters. When I copy e.g. " +49 (241) 12 34 56 - 78 ", all spaces, hyphens, and parentheses are filtered out.

However, when I copy the same number with a trailing line break, filtering is disabled and all special characters become part of the number to dial: grafik

The trailing line break is annoying in multiple ways: While it disables all filtering, it's also difficult to remove, because the phone number field is a single-line edit field. Hence, the trailing line break is invisible. You can only guess that by looking at the added %0a.

General information

Expected behaviour

Only numbers and special characters that can be dialed (like + and #) are considered for the phone number to dial. All other characters are filtered out, especially line breaks.

To Reproduce

  1. Copy a phone number with a line break like the following one to the Linphone phone number field:
+49 (241) 12 34 56 - 78
  1. Notice how none of the special characters are filtered out and an extra %0a is added at the end.

Additional context

No response

SDK logs URL

No response

ColinFinck commented 5 months ago

Same problem if you copy the number with quotation marks of a phone number like " +49 (241) 12 34 56 - 78 ". Please also filter out quotation marks.