From 4935083fef359603c444933f53a2169fab4ac582 Mon Sep 17 00:00:00 2001 From: btzr-io Date: Fri, 11 May 2018 09:14:08 -0600 Subject: [PATCH] add validation for uri --- src/renderer/component/externalLink/view.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/component/externalLink/view.jsx b/src/renderer/component/externalLink/view.jsx index 67fe10f60..2cd4a208b 100644 --- a/src/renderer/component/externalLink/view.jsx +++ b/src/renderer/component/externalLink/view.jsx @@ -1,6 +1,6 @@ // @flow import * as React from 'react'; -import { MODALS } from 'lbry-redux'; +import { MODALS, isURIValid } from 'lbry-redux'; import Button from 'component/button'; type Props = { @@ -43,7 +43,7 @@ class ExternalLink extends React.PureComponent { } // Return local link if protocol is lbry uri - if (protocol && protocol[0] === 'lbry:') { + if (protocol && protocol[0] === 'lbry:' && isURIValid(href)) { element = (