formatName - replace spaces with dashes
Name-formatter now replaces spaces with dashes, for more readable names. This is similar to Wordpress' permalink processing.
This commit is contained in:
parent
3471184828
commit
4bf4d14a24
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue