From 3f83355d9ffff020687cb55f1985f50fc4d97b89 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 29 Oct 2020 10:16:31 +0000 Subject: [PATCH] Clipper: Fixes #3984: Images from some website were not being downloaded --- CliClient/package-lock.json | 31 +++---- CliClient/package.json | 2 +- .../html_to_md/anchor_with_brackets.html | 1 + .../tests/html_to_md/anchor_with_brackets.md | 1 + .../tests/html_to_md/image_with_brackets.html | 1 + .../tests/html_to_md/image_with_brackets.md | 1 + .../tests/html_to_md/image_with_title1.html | 1 + .../tests/html_to_md/image_with_title1.md | 1 + .../tests/html_to_md/image_with_title2.html | 1 + .../tests/html_to_md/image_with_title2.md | 1 + ElectronClient/package-lock.json | 51 +++++------ ElectronClient/package.json | 2 +- ReactNativeClient/lib/htmlUtils.js | 1 + ReactNativeClient/lib/markdownUtils.ts | 8 ++ ReactNativeClient/lib/services/rest/Api.ts | 4 + package-lock.json | 84 ++++++++++++------- package.json | 2 +- 17 files changed, 110 insertions(+), 83 deletions(-) create mode 100644 CliClient/tests/html_to_md/anchor_with_brackets.html create mode 100644 CliClient/tests/html_to_md/anchor_with_brackets.md create mode 100644 CliClient/tests/html_to_md/image_with_brackets.html create mode 100644 CliClient/tests/html_to_md/image_with_brackets.md create mode 100644 CliClient/tests/html_to_md/image_with_title1.html create mode 100644 CliClient/tests/html_to_md/image_with_title1.md create mode 100644 CliClient/tests/html_to_md/image_with_title2.html create mode 100644 CliClient/tests/html_to_md/image_with_title2.md diff --git a/CliClient/package-lock.json b/CliClient/package-lock.json index ff98167b2..60f8a8b83 100644 --- a/CliClient/package-lock.json +++ b/CliClient/package-lock.json @@ -23,9 +23,9 @@ "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==" }, "abab": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz", - "integrity": "sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg==" + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==" }, "abbrev": { "version": "1.1.1", @@ -33,9 +33,9 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "acorn": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz", - "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==" + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" }, "acorn-globals": { "version": "4.3.4", @@ -47,9 +47,9 @@ }, "dependencies": { "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==" + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==" } } }, @@ -3655,9 +3655,9 @@ "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=" }, "joplin-turndown": { - "version": "4.0.29", - "resolved": "https://registry.npmjs.org/joplin-turndown/-/joplin-turndown-4.0.29.tgz", - "integrity": "sha512-rVGu8u4TpSRETo59/jiVW9iaXnpdxxpBHjb7nyCflkDfWhg1Kska4uagBQGw7cD2yxw7mB2YUIB/fAgtlIzcDQ==", + "version": "4.0.30", + "resolved": "https://registry.npmjs.org/joplin-turndown/-/joplin-turndown-4.0.30.tgz", + "integrity": "sha512-OrGdNTsjI6/cbx/es9Hl0YI3YTql4SopduFcYCnWTZgqT0SJqILnF2JQxSNnbPnkSDIIRdNOG4+iNzlY6bS1nw==", "requires": { "css": "^2.2.4", "html-entities": "^1.2.1", @@ -5573,13 +5573,6 @@ "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", "requires": { "lodash": "^4.17.19" - }, - "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - } } }, "request-promise-native": { diff --git a/CliClient/package.json b/CliClient/package.json index 54abbdd96..8f7ab2c69 100644 --- a/CliClient/package.json +++ b/CliClient/package.json @@ -59,7 +59,7 @@ "image-data-uri": "^2.0.0", "image-type": "^3.0.0", "immer": "^7.0.14", - "joplin-turndown": "^4.0.29", + "joplin-turndown": "^4.0.30", "joplin-turndown-plugin-gfm": "^1.0.12", "json-stringify-safe": "^5.0.1", "jssha": "^2.3.0", diff --git a/CliClient/tests/html_to_md/anchor_with_brackets.html b/CliClient/tests/html_to_md/anchor_with_brackets.html new file mode 100644 index 000000000..900fd18ca --- /dev/null +++ b/CliClient/tests/html_to_md/anchor_with_brackets.html @@ -0,0 +1 @@ +testing \ No newline at end of file diff --git a/CliClient/tests/html_to_md/anchor_with_brackets.md b/CliClient/tests/html_to_md/anchor_with_brackets.md new file mode 100644 index 000000000..3cc3bc34a --- /dev/null +++ b/CliClient/tests/html_to_md/anchor_with_brackets.md @@ -0,0 +1 @@ +[testing](https://images.macrumors.com/filters:quality%2890%29/article.html) \ No newline at end of file diff --git a/CliClient/tests/html_to_md/image_with_brackets.html b/CliClient/tests/html_to_md/image_with_brackets.html new file mode 100644 index 000000000..56707da2d --- /dev/null +++ b/CliClient/tests/html_to_md/image_with_brackets.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/CliClient/tests/html_to_md/image_with_brackets.md b/CliClient/tests/html_to_md/image_with_brackets.md new file mode 100644 index 000000000..cb57c8843 --- /dev/null +++ b/CliClient/tests/html_to_md/image_with_brackets.md @@ -0,0 +1 @@ +![](https://images.macrumors.com/filters:quality%2890%29/article/test.jpg?high) \ No newline at end of file diff --git a/CliClient/tests/html_to_md/image_with_title1.html b/CliClient/tests/html_to_md/image_with_title1.html new file mode 100644 index 000000000..d11663017 --- /dev/null +++ b/CliClient/tests/html_to_md/image_with_title1.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/CliClient/tests/html_to_md/image_with_title1.md b/CliClient/tests/html_to_md/image_with_title1.md new file mode 100644 index 000000000..df842f3e0 --- /dev/null +++ b/CliClient/tests/html_to_md/image_with_title1.md @@ -0,0 +1 @@ +![](https://example.com/test.jpg "hello") \ No newline at end of file diff --git a/CliClient/tests/html_to_md/image_with_title2.html b/CliClient/tests/html_to_md/image_with_title2.html new file mode 100644 index 000000000..1fdcaf9a6 --- /dev/null +++ b/CliClient/tests/html_to_md/image_with_title2.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/CliClient/tests/html_to_md/image_with_title2.md b/CliClient/tests/html_to_md/image_with_title2.md new file mode 100644 index 000000000..6ddba90b9 --- /dev/null +++ b/CliClient/tests/html_to_md/image_with_title2.md @@ -0,0 +1 @@ +![](https://example.com/test.jpg "hello & "(ouch)"") \ No newline at end of file diff --git a/ElectronClient/package-lock.json b/ElectronClient/package-lock.json index 7dfca8a22..3fe1dd951 100644 --- a/ElectronClient/package-lock.json +++ b/ElectronClient/package-lock.json @@ -644,9 +644,9 @@ "dev": true }, "abab": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz", - "integrity": "sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg==" + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==" }, "abbrev": { "version": "1.1.1", @@ -654,9 +654,9 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "acorn": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz", - "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==" + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" }, "acorn-globals": { "version": "4.3.4", @@ -668,9 +668,9 @@ }, "dependencies": { "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==" + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==" } } }, @@ -7312,9 +7312,9 @@ "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=" }, "joplin-turndown": { - "version": "4.0.29", - "resolved": "https://registry.npmjs.org/joplin-turndown/-/joplin-turndown-4.0.29.tgz", - "integrity": "sha512-rVGu8u4TpSRETo59/jiVW9iaXnpdxxpBHjb7nyCflkDfWhg1Kska4uagBQGw7cD2yxw7mB2YUIB/fAgtlIzcDQ==", + "version": "4.0.30", + "resolved": "https://registry.npmjs.org/joplin-turndown/-/joplin-turndown-4.0.30.tgz", + "integrity": "sha512-OrGdNTsjI6/cbx/es9Hl0YI3YTql4SopduFcYCnWTZgqT0SJqILnF2JQxSNnbPnkSDIIRdNOG4+iNzlY6bS1nw==", "requires": { "css": "^2.2.4", "html-entities": "^1.2.1", @@ -7387,9 +7387,9 @@ }, "dependencies": { "ajv": { - "version": "6.12.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", - "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -7398,9 +7398,9 @@ } }, "aws4": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", - "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", + "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==" }, "fast-deep-equal": { "version": "3.1.3", @@ -7408,11 +7408,11 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "requires": { - "ajv": "^6.5.5", + "ajv": "^6.12.3", "har-schema": "^2.0.0" } }, @@ -10276,13 +10276,6 @@ "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", "requires": { "lodash": "^4.17.19" - }, - "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - } } }, "request-promise-native": { diff --git a/ElectronClient/package.json b/ElectronClient/package.json index 23e5f8f38..551ce134b 100644 --- a/ElectronClient/package.json +++ b/ElectronClient/package.json @@ -145,7 +145,7 @@ "htmlparser2": "^4.1.0", "image-type": "^3.0.0", "immer": "^7.0.5", - "joplin-turndown": "^4.0.29", + "joplin-turndown": "^4.0.30", "joplin-turndown-plugin-gfm": "^1.0.12", "json-stringify-safe": "^5.0.1", "jssha": "^2.3.1", diff --git a/ReactNativeClient/lib/htmlUtils.js b/ReactNativeClient/lib/htmlUtils.js index e8e88bc4e..2da94dfe6 100644 --- a/ReactNativeClient/lib/htmlUtils.js +++ b/ReactNativeClient/lib/htmlUtils.js @@ -42,6 +42,7 @@ class HtmlUtils { return selfClosingElements.includes(tagName.toLowerCase()); } + // Returns the **encoded** URLs, so to be useful they should be decoded again before use. extractImageUrls(html) { if (!html) return []; diff --git a/ReactNativeClient/lib/markdownUtils.ts b/ReactNativeClient/lib/markdownUtils.ts index c7d82d896..774dd07ad 100644 --- a/ReactNativeClient/lib/markdownUtils.ts +++ b/ReactNativeClient/lib/markdownUtils.ts @@ -30,6 +30,13 @@ const markdownUtils = { return url; }, + unescapeLinkUrl(url:string) { + url = url.replace(/%28/g, '('); + url = url.replace(/%29/g, ')'); + url = url.replace(/%20/g, ' '); + return url; + }, + prependBaseUrl(md:string, baseUrl:string) { // eslint-disable-next-line no-useless-escape return md.replace(/(\]\()([^\s\)]+)(.*?\))/g, (_match:any, before:string, url:string, after:string) => { @@ -37,6 +44,7 @@ const markdownUtils = { }); }, + // Returns the **encoded** URLs, so to be useful they should be decoded again before use. extractImageUrls(md:string) { const markdownIt = new MarkdownIt(); setupLinkify(markdownIt); // Necessary to support file:/// links diff --git a/ReactNativeClient/lib/services/rest/Api.ts b/ReactNativeClient/lib/services/rest/Api.ts index b5fb17c72..415ef8a0b 100644 --- a/ReactNativeClient/lib/services/rest/Api.ts +++ b/ReactNativeClient/lib/services/rest/Api.ts @@ -2,6 +2,7 @@ import Setting from 'lib/models/Setting'; import Logger from 'lib/Logger'; import shim from 'lib/shim'; import uuid from 'lib/uuid'; +import markdownUtils from 'lib/markdownUtils'; const { ltrimSlashes } = require('lib/path-utils'); const { Database } = require('lib/database.js'); @@ -631,6 +632,9 @@ export default class Api { async downloadImage_(url:string /* , allowFileProtocolImages */) { const tempDir = Setting.value('tempDir'); + // The URL we get to download have been extracted from the Markdown document + url = markdownUtils.unescapeLinkUrl(url); + const isDataUrl = url && url.toLowerCase().indexOf('data:') === 0; const name = isDataUrl ? md5(`${Math.random()}_${Date.now()}`) : filename(url); diff --git a/package-lock.json b/package-lock.json index 53307aff5..9a0ab1234 100644 --- a/package-lock.json +++ b/package-lock.json @@ -319,14 +319,14 @@ } }, "abab": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz", - "integrity": "sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg==" + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==" }, "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==" + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" }, "acorn-globals": { "version": "4.3.4", @@ -335,6 +335,13 @@ "requires": { "acorn": "^6.0.1", "acorn-walk": "^6.0.1" + }, + "dependencies": { + "acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==" + } } }, "acorn-jsx": { @@ -352,6 +359,7 @@ "version": "6.10.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "dev": true, "requires": { "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", @@ -757,9 +765,9 @@ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", - "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", + "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==" }, "bach": { "version": "1.2.0", @@ -2652,7 +2660,8 @@ "fast-deep-equal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true }, "fast-glob": { "version": "3.0.4", @@ -3821,12 +3830,30 @@ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" }, "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "requires": { - "ajv": "^6.5.5", + "ajv": "^6.12.3", "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + } } }, "has": { @@ -4404,9 +4431,9 @@ "dev": true }, "joplin-turndown": { - "version": "4.0.29", - "resolved": "https://registry.npmjs.org/joplin-turndown/-/joplin-turndown-4.0.29.tgz", - "integrity": "sha512-rVGu8u4TpSRETo59/jiVW9iaXnpdxxpBHjb7nyCflkDfWhg1Kska4uagBQGw7cD2yxw7mB2YUIB/fAgtlIzcDQ==", + "version": "4.0.30", + "resolved": "https://registry.npmjs.org/joplin-turndown/-/joplin-turndown-4.0.30.tgz", + "integrity": "sha512-OrGdNTsjI6/cbx/es9Hl0YI3YTql4SopduFcYCnWTZgqT0SJqILnF2JQxSNnbPnkSDIIRdNOG4+iNzlY6bS1nw==", "requires": { "css": "^2.2.4", "html-entities": "^1.2.1", @@ -4470,13 +4497,6 @@ "whatwg-url": "^7.0.0", "ws": "^7.0.0", "xml-name-validator": "^3.0.0" - }, - "dependencies": { - "acorn": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz", - "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==" - } } }, "json-parse-better-errors": { @@ -5453,16 +5473,16 @@ "dev": true }, "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "requires": { "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", + "fast-levenshtein": "~2.0.6", "levn": "~0.3.0", "prelude-ls": "~1.1.2", "type-check": "~0.3.2", - "wordwrap": "~1.0.0" + "word-wrap": "~1.2.3" } }, "ordered-read-streams": { @@ -7328,13 +7348,13 @@ "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true }, "wrap-ansi": { "version": "3.0.1", diff --git a/package.json b/package.json index d0901c62a..84e76db11 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "dependencies": { "follow-redirects": "^1.11.0", "immer": "^7.0.5", - "joplin-turndown": "^4.0.29", + "joplin-turndown": "^4.0.30", "joplin-turndown-plugin-gfm": "^1.0.12", "relative": "^3.0.2" }