You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@salesforcedevs/docs-components

Package Overview
Dependencies
Maintainers
17
Versions
795
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salesforcedevs/docs-components - npm Package Compare versions

Comparing version

to
1.14.4-edit

src/modules/doc/markdownEditor/markdownEditor.css

3

package.json
{
"name": "@salesforcedevs/docs-components",
"version": "1.14.3-alpha",
"version": "1.14.4-edit",
"description": "Docs Lightning web components for DSC",

@@ -16,2 +16,3 @@ "license": "MIT",

"classnames": "2.5.1",
"dompurify": "3.2.4",
"kagekiri": "1.4.2",

@@ -18,0 +19,0 @@ "lodash.orderby": "4.6.0",

@@ -21,2 +21,3 @@ /* eslint-disable @lwc/lwc/no-document-query */

import { track as trackGTM } from "dxUtils/analytics";
import DOMPurify from "dompurify";

@@ -429,5 +430,15 @@ // TODO: Imitating from actual implementation as doc-content use it like this. We should refactor it later.

private sanitizeUrlPart(part: string | undefined): string | undefined {
if (!part) {
return part;
}
return DOMPurify.sanitize(part);
}
getReferenceFromUrl(): PageReference {
const [page, docId, deliverable, contentDocumentId] =
window.location.pathname.substr(1).split("/");
window.location.pathname
.substr(1)
.split("/")
.map(this.sanitizeUrlPart);

@@ -441,5 +452,5 @@ const { origin: domain, hash, search } = window.location;

domain,
hash,
hash: this.sanitizeUrlPart(hash),
page,
search
search: this.sanitizeUrlPart(search)
};

@@ -707,3 +718,3 @@ }

const div = document.createElement("div");
div.innerHTML = this.docContent;
div.innerHTML = DOMPurify.sanitize(this.docContent);
const docDescription = div.querySelector(".shortdesc")?.textContent;

@@ -710,0 +721,0 @@ const topicTitle = div.querySelector("h1")?.textContent;