mapbox / mapbox-speech-swift

Natural-sounding text-to-speech in Swift or Objective-C on iOS, macOS, tvOS, and watchOS
ISC License
42 stars 17 forks source link

Tighten up path escaping #20

Closed 1ec5 closed 5 years ago

1ec5 commented 5 years ago

Speculatively fixed an issue where SpeechSynthesizer.url(forSynthesizing:) would crash because of a malformed path. When parsing URLs, it’s always a good idea to lean on standard library APIs that are documented to be RFC-compliant, rather than hand-rolling character sets and other logic. We received a report of this issue when the library is used with the Mapbox Navigation SDK and the Directions API, but I’m not sure what API response would’ve caused the path to contain a character that’s problematic when unescaped.

/cc @mapbox/navigation-ios @samfader