Add in escaping of quotes for relative paths (#145)

* Add in escaping of quotes for relative paths

* Add double quote escaping

* Fix lint errors

* Always escape relative paths
pull/144/merge
Andrew McOlash 5 years ago committed by Romain
parent 63990904d0
commit 11da4850c8

@ -2,5 +2,10 @@ const path = require('path')
module.exports = (target, options) => {
const albumPath = options.data.root.album.path
return path.relative(path.dirname(albumPath), target)
var relative = path.relative(path.dirname(albumPath), target)
// Escape single/double quotes
var escaped = relative.replace(/'/g, '%27')
escaped = escaped.replace(/"/g, '%22')
return escaped
}

Loading…
Cancel
Save