diff --git a/browser/components/CodeEditor.js b/browser/components/CodeEditor.js index 995542a0..1714e281 100644 --- a/browser/components/CodeEditor.js +++ b/browser/components/CodeEditor.js @@ -193,7 +193,7 @@ export default class CodeEditor extends React.Component { const filename = path.basename(imagePath) copyImage(imagePath, this.props.storageKey).then((imagePathInTheStorage) => { - const imageMd = `![${encodeURI(filename)}](${imagePathInTheStorage})` + const imageMd = `![${filename}](${imagePathInTheStorage})` this.insertImageMd(imageMd) }) } diff --git a/browser/main/lib/dataApi/copyImage.js b/browser/main/lib/dataApi/copyImage.js index f6da5ae2..dfd72476 100644 --- a/browser/main/lib/dataApi/copyImage.js +++ b/browser/main/lib/dataApi/copyImage.js @@ -24,7 +24,7 @@ function copyImage (filePath, storageKey) { const basename = `${imageName}${imageExt}` const outputImage = fs.createWriteStream(path.join(targetStorage.path, 'images', basename)) inputImage.pipe(outputImage) - resolve(`${encodeURI(targetStorage.path)}/images/${encodeURI(basename)}`) + resolve(`${targetStorage.path}/images/${basename}`) } catch (e) { return reject(e) }