fix lbry url validation

This commit is contained in:
btzr-io 2019-10-09 23:11:50 -06:00 committed by Sean Yesmunt
parent ef1d676379
commit 78717ce47c
2 changed files with 4 additions and 5 deletions

View file

@ -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);
}

View file

@ -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."
}
}