wikizimmer.js sanitizeFN Windows
This commit is contained in:
parent
15dc79a822
commit
c741b0e79e
|
@ -72,8 +72,11 @@ let http // http request
|
||||||
let sanitizeRE = /(?:[\x00-\x1F<>:"~\\\?\*]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f])|(?:[. ]$))+/g
|
let sanitizeRE = /(?:[\x00-\x1F<>:"~\\\?\*]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f])|(?:[. ]$))+/g
|
||||||
|
|
||||||
function sanitizeFN ( name ) { // after https://github.com/pillarjs/encodeurl
|
function sanitizeFN ( name ) { // after https://github.com/pillarjs/encodeurl
|
||||||
return String( name ).replace( sanitizeRE, encodeURIComponent ).replace( /%/g, '~' )
|
if ( os.type() == 'Windows_NT' ) {
|
||||||
//~ return sanitizeFilename( name, { replacement: '.' })
|
return String( name ).replace( sanitizeRE, encodeURIComponent ).replace( /%/g, '~' )
|
||||||
|
} else {
|
||||||
|
return name
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function elapsedStr( from , to = Date.now()) {
|
function elapsedStr( from , to = Date.now()) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user