@locker/html-sanitizer
Advanced tools
Comparing version 0.12.4 to 0.12.6
@@ -281,4 +281,4 @@ /** | ||
const c = sharedDom.DocumentCreateElement(document$1, 'div'); | ||
sharedDom.ElementSetAttribute(c, 'style', 'display:none'); | ||
sharedDom.ElementSetAttribute(c, 'id', url); | ||
sharedDom.ElementSetAttributeUtil(c, 'style', 'display:none'); | ||
sharedDom.ElementSetAttributeUtil(c, 'id', url); | ||
const body = shared.FunctionCall(sharedDom.DocumentBodyGetter, document$1); | ||
@@ -290,7 +290,7 @@ sharedDom.NodeAppendChild(body, c); | ||
const { normalizedFragment, requestedFragment } = normalizedHref; | ||
let el = sharedDom.ElementQuerySelector(container, `#${normalizedFragment}`); | ||
let el = sharedDom.ElementQuerySelectorUtil(container, `#${normalizedFragment}`); | ||
if (!el) { | ||
try { | ||
el = sharedDom.ElementQuerySelector(container, `#${requestedFragment}`); | ||
sharedDom.ElementSetAttribute(el, 'id', normalizedFragment); | ||
el = sharedDom.ElementQuerySelectorUtil(container, `#${requestedFragment}`); | ||
sharedDom.ElementSetAttributeUtil(el, 'id', normalizedFragment); | ||
} | ||
@@ -310,7 +310,7 @@ catch (e) { | ||
updater(container, normalizedHref); | ||
sharedDom.WindowClearInterval(window, interval); | ||
sharedDom.WindowClearIntervalUtil(window, interval); | ||
} | ||
}; | ||
// wait for request to finish, then update content | ||
const interval = sharedDom.WindowSetInterval(window, checkFn, 50); | ||
const interval = sharedDom.WindowSetIntervalUtil(window, checkFn, 50); | ||
} | ||
@@ -339,3 +339,3 @@ else { | ||
if (el) { | ||
sharedDom.ElementSetAttribute(el, 'id', normalizedHref.normalizedFragment); | ||
sharedDom.ElementSetAttributeUtil(el, 'id', normalizedHref.normalizedFragment); | ||
} | ||
@@ -347,6 +347,6 @@ } | ||
}; | ||
const xhr = sharedDom.XhrCreate(); | ||
sharedDom.XhrOpen(xhr, 'GET', normalizedHref.requestedUrl); | ||
const xhr = sharedDom.XhrCreateUtil(); | ||
sharedDom.XhrOpenUtil(xhr, 'GET', normalizedHref.requestedUrl); | ||
shared.ReflectApply(sharedDom.XhrOnReadyStateChangeSetter, xhr, [onComplete]); | ||
sharedDom.XhrSend(xhr); | ||
sharedDom.XhrSendUtil(xhr); | ||
} | ||
@@ -409,2 +409,2 @@ function sanitizeSvgHrefValue(value) { | ||
exports.svgSanitizer = svgSanitizer; | ||
/** version: 0.12.4 */ | ||
/** version: 0.12.6 */ |
@@ -5,3 +5,3 @@ /** | ||
import { WeakMapCreate, WeakMapGet, MapForEach, WeakMapSet, ArrayConcat, ArrayFilter, ArrayIncludes, SetCreate, StringStartsWith, StringSplit, StringReplace, StringToLowerCase, SetHas, SetAdd, ReflectApply, StringToUpperCase, FunctionCall, MapCreate, SetDelete } from '@locker/shared'; | ||
import { DocumentCreateElement, DocumentGetElementById, WindowSetInterval, XhrCreate, XhrOpen, XhrOnReadyStateChangeSetter, XhrSend, NodeNodeNameGetter, ElementSetAttribute, DocumentBodyGetter, NodeAppendChild, ElementQuerySelector, WindowClearInterval, XhrReadyStateGetter, XhrStatusGetter, DocumentFragmentGetElementById } from '@locker/shared-dom'; | ||
import { DocumentCreateElement, DocumentGetElementById, WindowSetIntervalUtil, XhrCreateUtil, XhrOpenUtil, XhrOnReadyStateChangeSetter, XhrSendUtil, NodeNodeNameGetter, ElementSetAttributeUtil, DocumentBodyGetter, NodeAppendChild, ElementQuerySelectorUtil, WindowClearIntervalUtil, XhrReadyStateGetter, XhrStatusGetter, DocumentFragmentGetElementById } from '@locker/shared-dom'; | ||
import DOMPurify from 'dompurify'; | ||
@@ -274,4 +274,4 @@ | ||
const c = DocumentCreateElement(document$1, 'div'); | ||
ElementSetAttribute(c, 'style', 'display:none'); | ||
ElementSetAttribute(c, 'id', url); | ||
ElementSetAttributeUtil(c, 'style', 'display:none'); | ||
ElementSetAttributeUtil(c, 'id', url); | ||
const body = FunctionCall(DocumentBodyGetter, document$1); | ||
@@ -283,7 +283,7 @@ NodeAppendChild(body, c); | ||
const { normalizedFragment, requestedFragment } = normalizedHref; | ||
let el = ElementQuerySelector(container, `#${normalizedFragment}`); | ||
let el = ElementQuerySelectorUtil(container, `#${normalizedFragment}`); | ||
if (!el) { | ||
try { | ||
el = ElementQuerySelector(container, `#${requestedFragment}`); | ||
ElementSetAttribute(el, 'id', normalizedFragment); | ||
el = ElementQuerySelectorUtil(container, `#${requestedFragment}`); | ||
ElementSetAttributeUtil(el, 'id', normalizedFragment); | ||
} | ||
@@ -303,7 +303,7 @@ catch (e) { | ||
updater(container, normalizedHref); | ||
WindowClearInterval(window, interval); | ||
WindowClearIntervalUtil(window, interval); | ||
} | ||
}; | ||
// wait for request to finish, then update content | ||
const interval = WindowSetInterval(window, checkFn, 50); | ||
const interval = WindowSetIntervalUtil(window, checkFn, 50); | ||
} | ||
@@ -332,3 +332,3 @@ else { | ||
if (el) { | ||
ElementSetAttribute(el, 'id', normalizedHref.normalizedFragment); | ||
ElementSetAttributeUtil(el, 'id', normalizedHref.normalizedFragment); | ||
} | ||
@@ -340,6 +340,6 @@ } | ||
}; | ||
const xhr = XhrCreate(); | ||
XhrOpen(xhr, 'GET', normalizedHref.requestedUrl); | ||
const xhr = XhrCreateUtil(); | ||
XhrOpenUtil(xhr, 'GET', normalizedHref.requestedUrl); | ||
ReflectApply(XhrOnReadyStateChangeSetter, xhr, [onComplete]); | ||
XhrSend(xhr); | ||
XhrSendUtil(xhr); | ||
} | ||
@@ -397,2 +397,2 @@ function sanitizeSvgHrefValue(value) { | ||
export { config as CONFIG, blobSanitizer, sanitize, sanitizeSvgHrefValue, sanitizer, svgSanitizer }; | ||
/** version: 0.12.4 */ | ||
/** version: 0.12.6 */ |
{ | ||
"name": "@locker/html-sanitizer", | ||
"version": "0.12.4", | ||
"version": "0.12.6", | ||
"license": "Salesforce Developer Agreement", | ||
@@ -22,8 +22,8 @@ "author": "Salesforce UI Security Team", | ||
"dependencies": { | ||
"@locker/shared": "0.12.4", | ||
"@locker/shared-dom": "0.12.4", | ||
"@locker/shared": "0.12.6", | ||
"@locker/shared-dom": "0.12.6", | ||
"@types/dompurify": "2.1.0", | ||
"dompurify": "2.2.2" | ||
}, | ||
"gitHead": "d3260278d9ca591eb39a5085ca1332d9ceac7546" | ||
"gitHead": "9e6962286e871b7a73a1411912fd903d78cebafe" | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
28831
0
+ Added@locker/shared@0.12.6(transitive)
+ Added@locker/shared-dom@0.12.6(transitive)
- Removed@locker/shared@0.12.4(transitive)
- Removed@locker/shared-dom@0.12.4(transitive)
Updated@locker/shared@0.12.6
Updated@locker/shared-dom@0.12.6