diff --git a/packages/app-cli/tests/pathUtils.js b/packages/app-cli/tests/pathUtils.js index 8b1680d0e..aa6e8d050 100644 --- a/packages/app-cli/tests/pathUtils.js +++ b/packages/app-cli/tests/pathUtils.js @@ -66,14 +66,14 @@ describe('pathUtils', function() { it('should create correct fileURL syntax', (async () => { const testCases_win32 = [ - ['C:\\handle\\space test', 'file:///C:/handle/space+test'], + ['C:\\handle\\space test', 'file:///C:/handle/space%20test'], ['C:\\escapeplus\\+', 'file:///C:/escapeplus/%2B'], - ['C:\\handle\\single quote\'', 'file:///C:/handle/single+quote%27'], + ['C:\\handle\\single quote\'', 'file:///C:/handle/single%20quote%27'], ]; const testCases_unixlike = [ - ['/handle/space test', 'file:///handle/space+test'], + ['/handle/space test', 'file:///handle/space%20test'], ['/escapeplus/+', 'file:///escapeplus/%2B'], - ['/handle/single quote\'', 'file:///handle/single+quote%27'], + ['/handle/single quote\'', 'file:///handle/single%20quote%27'], ]; for (let i = 0; i < testCases_win32.length; i++) { diff --git a/packages/lib/import-enex.js b/packages/lib/import-enex.js index bc9c4a8ef..e381723aa 100644 --- a/packages/lib/import-enex.js +++ b/packages/lib/import-enex.js @@ -528,7 +528,8 @@ function importEnex(parentFolderId, filePath, importOptions = null) { if (noteResource.filename) { const mimeTypeFromFile = mime.fromFilename(noteResource.filename); if (mimeTypeFromFile && mimeTypeFromFile !== mimeType) { - console.info(`Invalid mime type "${mimeType}" for resource "${noteResource.filename}". Using "${mimeTypeFromFile}" instead.`); + // Don't print statement by default because it would show up in test units + // console.info(`Invalid mime type "${mimeType}" for resource "${noteResource.filename}". Using "${mimeTypeFromFile}" instead.`); mimeType = mimeTypeFromFile; } } diff --git a/packages/lib/path-utils.ts b/packages/lib/path-utils.ts index 4a1202813..cd74651ad 100644 --- a/packages/lib/path-utils.ts +++ b/packages/lib/path-utils.ts @@ -121,7 +121,6 @@ export function toFileProtocolPath(filePathEncode: string, os: string = null) { filePathEncode = encodeURI(filePathEncode); filePathEncode = filePathEncode.replace(/\+/g, '%2B'); // escape '+' with unicode - filePathEncode = filePathEncode.replace(/%20/g, '+'); // switch space (%20) with '+'. To comply with syntax used by joplin, see urldecode_(str) in MdToHtml.js return `file://${filePathEncode.replace(/\'/g, '%27')}`; // escape '(single quote) with unicode, to prevent crashing the html view } diff --git a/packages/plugins/package.json b/packages/plugins/package.json index 8c5df58c3..1665dfcbd 100644 --- a/packages/plugins/package.json +++ b/packages/plugins/package.json @@ -3,10 +3,5 @@ "version": "0.0.0", "description": "Sub-package to group official Joplin plugins", "private": true, - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", "license": "MIT" }