GH-671 Fixed entire link being made lower case (#688)

This commit is contained in:
Harrison Healey 2017-06-28 12:09:47 -04:00 committed by enahum
parent 3a233455a6
commit 6432a16fb2

View file

@ -19,7 +19,14 @@ export default class MarkdownLink extends PureComponent {
}
handlePress = () => {
const url = this.props.href.toLowerCase();
// Android doesn't like the protocol being upper case
let url = this.props.href;
const index = url.indexOf(':');
if (index !== -1) {
const protocol = url.substring(0, index);
url = protocol.toLowerCase() + url.substring(index);
}
Linking.canOpenURL(url).then((supported) => {
if (supported) {