Fix crash on non-HTTP scheme links#205
Merged
Merged
Conversation
The tel:, sms: and custom scheme cases also guard the fix when running on the JVM: the desktop JDK bundles a mailto protocol handler, so the mailto case alone would pass even without the fix. Android's libcore has no mailto handler and throws for all of these schemes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tapping a
mailto:,tel:or custom-scheme link crashes withMalformedURLException: unknown protocol.Since cb80529 (#203),
Navigator.getRouteDecision()eagerly resolves path-config properties for the proposed location, andPathConfigurationData.path()parses it withjava.net.URL. But only supports http, so it throws before anyRouteDecisionHandlerruns.Reproduce: Click on a
<a href="mailto:me@domain.com">me@domain.com</a>link.Verified in the Demo app. 1.2.8 works and 1.3.0 crashes. This PR would fix it.