From 6432a16fb247c0e2d6a48d34cb18ce4ae67ea58e Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Wed, 28 Jun 2017 12:09:47 -0400 Subject: [PATCH] GH-671 Fixed entire link being made lower case (#688) --- app/components/markdown/markdown_link.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/components/markdown/markdown_link.js b/app/components/markdown/markdown_link.js index 79d8ca0b1..0ce662041 100644 --- a/app/components/markdown/markdown_link.js +++ b/app/components/markdown/markdown_link.js @@ -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) {