From bd26d7ba441849cfe3ced3cfcbc8871178c5d70f Mon Sep 17 00:00:00 2001 From: Upsided Date: Thu, 28 Mar 2019 19:40:40 -0500 Subject: [PATCH] Allow unicode characters in claim names. See https://spec.lbry.com/#urls --- src/lbryURI.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lbryURI.js b/src/lbryURI.js index fd07213..3415b26 100644 --- a/src/lbryURI.js +++ b/src/lbryURI.js @@ -1,7 +1,8 @@ const channelNameMinLength = 1; const claimIdMaxLength = 40; -export const regexInvalidURI = /[^A-Za-z0-9-]/g; +// see https://spec.lbry.com/#urls +const regexInvalidURI = (exports.regexInvalidURI = /[=&#:$@%?\u{0000}-\u{0008}\u{000b}-\u{000c}\u{000e}-\u{001F}\u{D800}-\u{DFFF}\u{FFFE}-\u{FFFF}]/u); export const regexAddress = /^(b|r)(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/; /**