formatName now using different text sanitation method

This commit is contained in:
Ben Yanke 2016-11-16 13:56:04 -06:00 committed by GitHub
parent 4bf4d14a24
commit 33b43477d5

View file

@ -297,7 +297,7 @@ lbry.formatCredits = function(amount, precision)
lbry.formatName = function(name) {
// Converts LBRY name to standard format (all lower case, no special characters, spaces replaced by dashes)
name = name.replace(" ", "-");
name = name.replace('/\s+/g', '-');
name = name.toLowerCase().replace(/[^a-z0-9\-]/g, '');
return name;
}