From ce91e302094227d3811d6775b58615826ea263ae Mon Sep 17 00:00:00 2001 From: braginini Date: Sun, 3 Apr 2022 12:59:57 +0200 Subject: [PATCH] Correct minor warning --- package-lock.json | 14 +++++++------- package.json | 2 +- src/components/Banner.js | 1 + src/components/NewSetupKeyDialog.js | 2 +- src/components/addpeer/LinuxTab.js | 6 +++++- src/components/addpeer/MacTab.js | 2 +- src/components/addpeer/WindowsTab.js | 2 +- 7 files changed, 17 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7d12e0e..11215f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "autoprefixer": "^9", - "highlight.js": "^11.2.0", + "highlight.js": "^11.5.0", "history": "^5.0.1", "postcss": "^7", "prop-types": "^15.7.2", @@ -8909,9 +8909,9 @@ "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==" }, "node_modules/highlight.js": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.2.0.tgz", - "integrity": "sha512-JOySjtOEcyG8s4MLR2MNbLUyaXqUunmSnL2kdV/KuGJOmHZuAR5xC54Ko7goAXBWNhf09Vy3B+U7vR62UZ/0iw==", + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.5.0.tgz", + "integrity": "sha512-SM6WDj5/C+VfIY8pZ6yW6Xa0Fm1tniYVYWYW1Q/DcMnISZFrC3aQAZZZFAAZtybKNrGId3p/DNbFTtcTXXgYBw==", "engines": { "node": ">=12.0.0" } @@ -27699,9 +27699,9 @@ "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==" }, "highlight.js": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.2.0.tgz", - "integrity": "sha512-JOySjtOEcyG8s4MLR2MNbLUyaXqUunmSnL2kdV/KuGJOmHZuAR5xC54Ko7goAXBWNhf09Vy3B+U7vR62UZ/0iw==" + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.5.0.tgz", + "integrity": "sha512-SM6WDj5/C+VfIY8pZ6yW6Xa0Fm1tniYVYWYW1Q/DcMnISZFrC3aQAZZZFAAZtybKNrGId3p/DNbFTtcTXXgYBw==" }, "history": { "version": "5.0.1", diff --git a/package.json b/package.json index 011a0f9..1457f55 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "autoprefixer": "^9", - "highlight.js": "^11.2.0", + "highlight.js": "^11.5.0", "history": "^5.0.1", "postcss": "^7", "prop-types": "^15.7.2", diff --git a/src/components/Banner.js b/src/components/Banner.js index 48e3092..05c94af 100644 --- a/src/components/Banner.js +++ b/src/components/Banner.js @@ -24,6 +24,7 @@ export default function Banner() { href="https://blog.netbird.io/wiretrustee-becomes-netbird" className="font-bold underline" target="_blank" + rel="noreferrer" > {" "} Learn more{" "} diff --git a/src/components/NewSetupKeyDialog.js b/src/components/NewSetupKeyDialog.js index fcc8159..76e102e 100644 --- a/src/components/NewSetupKeyDialog.js +++ b/src/components/NewSetupKeyDialog.js @@ -3,7 +3,6 @@ import {Dialog, RadioGroup, Transition} from '@headlessui/react' import {XIcon} from '@heroicons/react/outline' import {ExclamationCircleIcon, QuestionMarkCircleIcon} from '@heroicons/react/solid' import PropTypes from "prop-types"; -import {Link} from "react-router-dom"; const types = [ {name: 'Reusable', description: 'This type of a setup key allows to setup multiple machine', value: 'reusable'}, @@ -172,6 +171,7 @@ const NewSetupKeyDialog = ({show, closeCallback}) => { { return commands.map(c => key != null ? c.replace("", key.Key) : c).join("\n") } + const escapeHtml = (unsafe) => { + return unsafe.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll("'", '''); + } + return ( -
    +
      {steps.map((step, stepIdx) => (
    1. diff --git a/src/components/addpeer/MacTab.js b/src/components/addpeer/MacTab.js index ef5e46b..dd80f40 100644 --- a/src/components/addpeer/MacTab.js +++ b/src/components/addpeer/MacTab.js @@ -53,7 +53,7 @@ const MacTab = ({setupKey}) => { return ( -
        +
          {steps.map((step, stepIdx) => (
        1. diff --git a/src/components/addpeer/WindowsTab.js b/src/components/addpeer/WindowsTab.js index cc2ee94..0bdbeec 100644 --- a/src/components/addpeer/WindowsTab.js +++ b/src/components/addpeer/WindowsTab.js @@ -63,7 +63,7 @@ const WindowsTab = ({setupKey}) => { return ( -
            +
              {steps.map((step, stepIdx) => (