diff --git a/docs/plugins.md b/docs/plugins.md index cd7016d6b..c5d0cc7fe 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -187,6 +187,8 @@ Pagination for docsify. By [@imyelo](https://github.com/imyelo) ``` +Click [here](https://github.com/imyelo/docsify-pagination#readme) to get more information. + ## Tabs A docsify.js plugin for displaying tabbed content from markdown. diff --git a/package-lock.json b/package-lock.json index 3a7c5a23f..973f404b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4347,14 +4347,14 @@ } }, "@vue/compiler-core": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.0.7.tgz", - "integrity": "sha512-JFohgBXoyUc3mdeI2WxlhjQZ5fakfemJkZHX8Gu/nFbEg3+lKVUZmNKWmmnp9aOzJQZKoj77LjmFxiP+P+7lMQ==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.0.11.tgz", + "integrity": "sha512-6sFj6TBac1y2cWCvYCA8YzHJEbsVkX7zdRs/3yK/n1ilvRqcn983XvpBbnN3v4mZ1UiQycTvOiajJmOgN9EVgw==", "dev": true, "requires": { "@babel/parser": "^7.12.0", "@babel/types": "^7.12.0", - "@vue/shared": "3.0.7", + "@vue/shared": "3.0.11", "estree-walker": "^2.0.1", "source-map": "^0.6.1" }, @@ -4366,15 +4366,15 @@ "dev": true }, "@babel/parser": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.9.tgz", - "integrity": "sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", + "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==", "dev": true }, "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.14.tgz", + "integrity": "sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -4397,49 +4397,49 @@ } }, "@vue/compiler-dom": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.7.tgz", - "integrity": "sha512-VnIH9EbWQm/Tkcp+8dCaNVsVvhm/vxCrIKWRkXY9215hTqOqQOvejT8IMjd2kc++nIsYMsdQk6H9qqBvoLe/Cw==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.11.tgz", + "integrity": "sha512-+3xB50uGeY5Fv9eMKVJs2WSRULfgwaTJsy23OIltKgMrynnIj8hTYY2UL97HCoz78aDw1VDXdrBQ4qepWjnQcw==", "dev": true, "requires": { - "@vue/compiler-core": "3.0.7", - "@vue/shared": "3.0.7" + "@vue/compiler-core": "3.0.11", + "@vue/shared": "3.0.11" } }, "@vue/reactivity": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.7.tgz", - "integrity": "sha512-FotWcNNaKhqpFZrdgsUOZ1enlJ5lhTt01CNTtLSyK7jYFgZBTuw8vKsEutZKDYZ1XKotOfoeO8N3pZQqmM6Etw==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.11.tgz", + "integrity": "sha512-SKM3YKxtXHBPMf7yufXeBhCZ4XZDKP9/iXeQSC8bBO3ivBuzAi4aZi0bNoeE2IF2iGfP/AHEt1OU4ARj4ao/Xw==", "dev": true, "requires": { - "@vue/shared": "3.0.7" + "@vue/shared": "3.0.11" } }, "@vue/runtime-core": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.7.tgz", - "integrity": "sha512-DBAZAwVvdmMXuyd6/9qqj/kYr/GaLTmn1L2/QLxLwP+UfhIboiTSBc/tUUb8MRk7Bb98GzNeAWkkT6AfooS3dQ==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.11.tgz", + "integrity": "sha512-87XPNwHfz9JkmOlayBeCCfMh9PT2NBnv795DSbi//C/RaAnc/bGZgECjmkD7oXJ526BZbgk9QZBPdFT8KMxkAg==", "dev": true, "requires": { - "@vue/reactivity": "3.0.7", - "@vue/shared": "3.0.7" + "@vue/reactivity": "3.0.11", + "@vue/shared": "3.0.11" } }, "@vue/runtime-dom": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.7.tgz", - "integrity": "sha512-Oij4ruOtnpQpCj+/Q3JPzgpTJ1Q7+N67pA53A8KVITEtxfvKL46NN6dhAZ5NGqwX6RWZpYqWQNewITeF0pHr8g==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.11.tgz", + "integrity": "sha512-jm3FVQESY3y2hKZ2wlkcmFDDyqaPyU3p1IdAX92zTNeCH7I8zZ37PtlE1b9NlCtzV53WjB4TZAYh9yDCMIEumA==", "dev": true, "requires": { - "@vue/runtime-core": "3.0.7", - "@vue/shared": "3.0.7", + "@vue/runtime-core": "3.0.11", + "@vue/shared": "3.0.11", "csstype": "^2.6.8" } }, "@vue/shared": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.0.7.tgz", - "integrity": "sha512-dn5FyfSc4ky424jH4FntiHno7Ss5yLkqKNmM/NXwANRnlkmqu74pnGetexDFVG5phMk9/FhwovUZCWGxsotVKg==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.0.11.tgz", + "integrity": "sha512-b+zB8A2so8eCE0JsxjL24J7vdGl8rzPQ09hZNhystm+KqSbKcAej1A+Hbva1rCMmTTqA+hFnUSDc5kouEo0JzA==", "dev": true }, "@zkochan/cmd-shim": { @@ -7233,9 +7233,9 @@ } }, "dompurify": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.6.tgz", - "integrity": "sha512-7b7ZArhhH0SP6W2R9cqK6RjaU82FZ2UPM7RO8qN1b1wyvC/NY1FNWcX1Pu00fFOAnzEORtwXe4bPaClg6pUybQ==" + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.7.tgz", + "integrity": "sha512-jdtDffdGNY+C76jvodNTu9jt5yYj59vuTUyx+wXdzcSwAGTYZDAQkQ7Iwx9zcGrA4ixC1syU4H3RZROqRxokxg==" }, "domutils": { "version": "1.7.0", @@ -20241,14 +20241,14 @@ "dev": true }, "vue3": { - "version": "npm:vue@3.0.7", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.0.7.tgz", - "integrity": "sha512-8h4TikD+JabbMK9aRlBO4laG0AtNHRPHynxYgWZ9sq1YUPfzynd9Jeeb27XNyZytC7aCQRX9xe1+TQJuc181Tw==", + "version": "npm:vue@3.0.11", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.0.11.tgz", + "integrity": "sha512-3/eUi4InQz8MPzruHYSTQPxtM3LdZ1/S/BvaU021zBnZi0laRUyH6pfuE4wtUeLvI8wmUNwj5wrZFvbHUXL9dw==", "dev": true, "requires": { - "@vue/compiler-dom": "3.0.7", - "@vue/runtime-dom": "3.0.7", - "@vue/shared": "3.0.7" + "@vue/compiler-dom": "3.0.11", + "@vue/runtime-dom": "3.0.11", + "@vue/shared": "3.0.11" } }, "w3c-hr-time": { @@ -20678,9 +20678,9 @@ "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yallist": { diff --git a/package.json b/package.json index 80c1b4974..39e4cc48c 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "*.js": "eslint --fix" }, "dependencies": { - "dompurify": "^2.2.6", + "dompurify": "^2.2.7", "marked": "^1.2.9", "medium-zoom": "^1.0.6", "opencollective-postinstall": "^2.0.2", diff --git a/packages/docsify-server-renderer/package-lock.json b/packages/docsify-server-renderer/package-lock.json index 2dcf4069e..ee64de857 100644 --- a/packages/docsify-server-renderer/package-lock.json +++ b/packages/docsify-server-renderer/package-lock.json @@ -45,9 +45,9 @@ } }, "dompurify": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.6.tgz", - "integrity": "sha512-7b7ZArhhH0SP6W2R9cqK6RjaU82FZ2UPM7RO8qN1b1wyvC/NY1FNWcX1Pu00fFOAnzEORtwXe4bPaClg6pUybQ==" + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.7.tgz", + "integrity": "sha512-jdtDffdGNY+C76jvodNTu9jt5yYj59vuTUyx+wXdzcSwAGTYZDAQkQ7Iwx9zcGrA4ixC1syU4H3RZROqRxokxg==" }, "good-listener": { "version": "1.2.2", diff --git a/packages/docsify-server-renderer/package.json b/packages/docsify-server-renderer/package.json index 2aa3226ae..82197b8eb 100644 --- a/packages/docsify-server-renderer/package.json +++ b/packages/docsify-server-renderer/package.json @@ -17,7 +17,7 @@ "dependencies": { "debug": "^4.3.2", "docsify": "^4.12.1", - "dompurify": "^2.2.6", + "dompurify": "^2.2.7", "node-fetch": "^2.6.0", "resolve-pathname": "^3.0.0" } diff --git a/src/plugins/search/search.js b/src/plugins/search/search.js index 94047c2ee..ce7481c5e 100644 --- a/src/plugins/search/search.js +++ b/src/plugins/search/search.js @@ -178,7 +178,7 @@ export function search(query) { keywords.forEach(keyword => { // From https://github.com/sindresorhus/escape-string-regexp const regEx = new RegExp( - ignoreDiacriticalMarks(keyword).replace( + escapeHtml(ignoreDiacriticalMarks(keyword)).replace( /[|\\{}()[\]^$+*?.]/g, '\\$&' ), @@ -187,10 +187,10 @@ export function search(query) { let indexTitle = -1; let indexContent = -1; handlePostTitle = postTitle - ? ignoreDiacriticalMarks(postTitle) + ? escapeHtml(ignoreDiacriticalMarks(postTitle)) : postTitle; handlePostContent = postContent - ? ignoreDiacriticalMarks(postContent) + ? escapeHtml(ignoreDiacriticalMarks(postContent)) : postContent; indexTitle = postTitle ? handlePostTitle.search(regEx) : -1;