From 78717ce47c1156e0b465ead7449c8e6864db94d3 Mon Sep 17 00:00:00 2001 From: btzr-io Date: Wed, 9 Oct 2019 23:11:50 -0600 Subject: [PATCH] fix lbry url validation --- src/ui/util/remark-lbry.js | 6 +++--- static/app-strings.json | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ui/util/remark-lbry.js b/src/ui/util/remark-lbry.js index 1cdf4b965..6a2baa77f 100644 --- a/src/ui/util/remark-lbry.js +++ b/src/ui/util/remark-lbry.js @@ -39,14 +39,14 @@ const validateURI = (match, eat) => { }; // Generate a markdown link from channel name -function tokenizeMention(eat, value, silent) { +function tokenizeMention(eat, value) { const match = /^@+[a-zA-Z0-9-#:/]+/.exec(value); return validateURI(match, eat); } // Generate a markdown link from lbry url -function tokenizeURI(eat, value, silent) { - const match = /^(lbry:\/\/)+[a-zA-Z0-9-@#:/]+/.exec(value); +function tokenizeURI(eat, value) { + const match = /^(lbry:\/\/)+.+/.exec(value); return validateURI(match, eat); } diff --git a/static/app-strings.json b/static/app-strings.json index afde10267..54bb4043c 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -792,7 +792,6 @@ "Create": "Create", "You have no rewards available.": "You have no rewards available.", "URL does not include name.": "URL does not include name.", - "Enter a LBRY URL or search for videos, music, games and more": "Enter a LBRY URL or search for videos, music, games and more", "I Understand": "I Understand", "Enter \"%acknowledgement_text\"": "Enter \"%acknowledgement_text\"", "Dear computer, %acknowledgement_text%": "Dear computer, %acknowledgement_text%", @@ -801,4 +800,4 @@ "You must enter \"%acknowledgement_text%\"": "You must enter \"%acknowledgement_text%\"", "Decrypt Wallet": "Decrypt Wallet", "Your wallet has been encrypted with a local password, performing this action will remove this password.": "Your wallet has been encrypted with a local password, performing this action will remove this password." -} \ No newline at end of file +}