AdguardTeam / AdGuardVPNForiOS

AdGuard VPN iOS app open bug tracker
https://adguard-vpn.com/
43 stars 4 forks source link

Prevent Smart Punctuation from altering DNS server addresses #357

Open ghost opened 2 months ago

ghost commented 2 months ago

Issue Details

When using a DNS server address with double hyphens, iOS’s Smart Punctuation feature turns the double hyphens into an emdash, which alters the server address, resulting in no connection.

Currently the only workaround is to copy and paste a server address in. Manually typing it won’t work.

image

image

Proposed solution

Programmatically prevent iOS Smart Punctuation from altering text when entering in DNS servers.

Something like the following in Swift may be a solution:

if #available(iOS 11.0, *) {
    textView.smartDashesType = .no
    textView.smartQuotesType = .no
    textView.smartInsertDeleteType = .no
} else {
    // Fallback on earlier versions
}

Alternative solution

No response

PavelParkhomenko commented 2 months ago

Hello! Thank you for your suggestion. We've forwarded the details to our development team for review. They will explore potential solutions.

In the meantime, as a temporary workaround, you can insert a space between hyphens and then remove it to prevent them from automatically converting to em dashes.

ghost commented 2 months ago

Hi @PavelParkhomenko, unfortunately the em dash doesn't get cancelled with a space, it puts a space between the two dashes. If the space is removed, Smart Punctuation takes over again. The only workaround at the moment is to copy and paste it in.

Natthaphonkanchaisri commented 2 months ago

Natthaphon99.com