forked from 0x2620/pandora
replace all not just first
This commit is contained in:
parent
7ea1f38a0f
commit
4689af2050
1 changed files with 3 additions and 2 deletions
|
@ -2659,8 +2659,9 @@ pandora.openURL = function(url) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pandora.safeDocumentName = function(name) {
|
pandora.safeDocumentName = function(name) {
|
||||||
['?', '#', '%'].forEach(function(c) {
|
['\\?', '#', '%', '/'].forEach(function(c) {
|
||||||
name = name.replace(c, '_');
|
var r = new RegExp(c, 'g')
|
||||||
|
name = name.replace(r, '_');
|
||||||
})
|
})
|
||||||
return name;
|
return name;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue