-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix opening links without http and https #640
base: develop
Are you sure you want to change the base?
Conversation
return; | ||
} | ||
|
||
if (!uri.IsAbsoluteUri || !(uri.Scheme.StartsWith("http", StringComparison.OrdinalIgnoreCase) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uri.Scheme.StartsWith("http", StringComparison.OrdinalIgnoreCase) || uri.Scheme.StartsWith("https", StringComparison.OrdinalIgnoreCase) === uri.Scheme.StartsWith("http", StringComparison.OrdinalIgnoreCase)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Catel even has StartsWithIgnoreCase and StartsWithAnyIgnoreCase
|| uri.Scheme.StartsWith("https", StringComparison.OrdinalIgnoreCase))) | ||
{ | ||
string modifiedUriString; | ||
if (uri.IsAbsoluteUri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe there is a way not to check it twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit tests are missing.
But, for example, what if I want to launch an app like this:
myapp://myaction
Will that no longer be possible?
return; | ||
} | ||
|
||
if (!uri.IsAbsoluteUri || !(uri.Scheme.StartsWith("http", StringComparison.OrdinalIgnoreCase) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Catel even has StartsWithIgnoreCase and StartsWithAnyIgnoreCase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can we be sure the behavior is correct if unit tests are missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Description of Change
Issues Resolved
API Changes
None
Platforms Affected
Behavioral Changes
None
Testing Procedure
PR Checklist