diff --git a/js/lbry.js b/js/lbry.js index bf57e6c05..673c4b10c 100644 --- a/js/lbry.js +++ b/js/lbry.js @@ -296,8 +296,10 @@ lbry.formatCredits = function(amount, precision) } lbry.formatName = function(name) { - // Converts LBRY name to standard format (all lower case, no special characters) - return name.toLowerCase().replace(/[^a-z0-9\-]/g, ''); + // Converts LBRY name to standard format (all lower case, no special characters, spaces replaced by dashes) + name = name.replace(" ", "-"); + name = name.toLowerCase().replace(/[^a-z0-9\-]/g, ''); + return name; } lbry.loadJs = function(src, type, onload)