umap-project 2.4.1__py3-none-any.whl → 2.4.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of umap-project might be problematic. Click here for more details.
- umap/__init__.py +1 -1
- umap/locale/el/LC_MESSAGES/django.po +145 -90
- umap/locale/en/LC_MESSAGES/django.po +13 -13
- umap/locale/eu/LC_MESSAGES/django.po +145 -89
- umap/static/umap/base.css +1 -1
- umap/static/umap/content.css +2 -2
- umap/static/umap/css/dialog.css +1 -1
- umap/static/umap/css/importers.css +2 -0
- umap/static/umap/css/panel.css +2 -2
- umap/static/umap/css/tooltip.css +1 -1
- umap/static/umap/js/components/alerts/alert.css +1 -1
- umap/static/umap/js/components/alerts/alert.js +1 -1
- umap/static/umap/js/modules/autocomplete.js +4 -4
- umap/static/umap/js/modules/browser.js +6 -6
- umap/static/umap/js/modules/caption.js +4 -4
- umap/static/umap/js/modules/dompurify.js +2 -3
- umap/static/umap/js/modules/facets.js +16 -10
- umap/static/umap/js/modules/global.js +16 -16
- umap/static/umap/js/modules/help.js +2 -2
- umap/static/umap/js/modules/importer.js +6 -6
- umap/static/umap/js/modules/importers/geodatamine.js +4 -4
- umap/static/umap/js/modules/importers/overpass.js +2 -2
- umap/static/umap/js/modules/orderable.js +2 -2
- umap/static/umap/js/modules/request.js +1 -1
- umap/static/umap/js/modules/rules.js +13 -10
- umap/static/umap/js/modules/sync/engine.js +3 -3
- umap/static/umap/js/modules/sync/updaters.js +10 -11
- umap/static/umap/js/modules/sync/websocket.js +1 -1
- umap/static/umap/js/modules/ui/dialog.js +1 -1
- umap/static/umap/js/modules/ui/panel.js +1 -1
- umap/static/umap/js/modules/ui/tooltip.js +6 -6
- umap/static/umap/js/modules/urls.js +1 -2
- umap/static/umap/js/modules/utils.js +16 -16
- umap/static/umap/js/umap.controls.js +26 -28
- umap/static/umap/js/umap.core.js +19 -15
- umap/static/umap/js/umap.datalayer.permissions.js +15 -18
- umap/static/umap/js/umap.features.js +91 -117
- umap/static/umap/js/umap.forms.js +46 -74
- umap/static/umap/js/umap.icon.js +17 -22
- umap/static/umap/js/umap.js +79 -83
- umap/static/umap/js/umap.layer.js +151 -169
- umap/static/umap/js/umap.permissions.js +6 -9
- umap/static/umap/js/umap.popup.js +19 -19
- umap/static/umap/js/umap.share.js +9 -15
- umap/static/umap/js/umap.slideshow.js +12 -14
- umap/static/umap/js/umap.tableeditor.js +5 -5
- umap/static/umap/locale/am_ET.json +5 -2
- umap/static/umap/locale/ar.json +5 -2
- umap/static/umap/locale/ast.json +5 -2
- umap/static/umap/locale/bg.json +5 -2
- umap/static/umap/locale/br.json +5 -2
- umap/static/umap/locale/ca.json +5 -2
- umap/static/umap/locale/cs_CZ.json +5 -2
- umap/static/umap/locale/da.json +5 -2
- umap/static/umap/locale/de.json +5 -2
- umap/static/umap/locale/el.json +10 -7
- umap/static/umap/locale/en.json +4 -2
- umap/static/umap/locale/en_US.json +5 -2
- umap/static/umap/locale/es.json +4 -2
- umap/static/umap/locale/et.json +5 -2
- umap/static/umap/locale/fa_IR.json +5 -2
- umap/static/umap/locale/fi.json +5 -2
- umap/static/umap/locale/fr.json +4 -2
- umap/static/umap/locale/gl.json +5 -2
- umap/static/umap/locale/he.json +5 -2
- umap/static/umap/locale/hr.json +5 -2
- umap/static/umap/locale/hu.json +5 -2
- umap/static/umap/locale/id.json +5 -2
- umap/static/umap/locale/is.json +5 -2
- umap/static/umap/locale/it.json +5 -2
- umap/static/umap/locale/ja.json +5 -2
- umap/static/umap/locale/ko.json +5 -2
- umap/static/umap/locale/lt.json +5 -2
- umap/static/umap/locale/ms.json +5 -2
- umap/static/umap/locale/nl.json +5 -2
- umap/static/umap/locale/no.json +5 -2
- umap/static/umap/locale/pl.json +5 -2
- umap/static/umap/locale/pl_PL.json +5 -2
- umap/static/umap/locale/pt.json +4 -2
- umap/static/umap/locale/pt_BR.json +5 -2
- umap/static/umap/locale/pt_PT.json +5 -2
- umap/static/umap/locale/ro.json +5 -2
- umap/static/umap/locale/ru.json +5 -2
- umap/static/umap/locale/sk_SK.json +5 -2
- umap/static/umap/locale/sl.json +5 -2
- umap/static/umap/locale/sr.json +5 -2
- umap/static/umap/locale/sv.json +5 -2
- umap/static/umap/locale/th_TH.json +5 -2
- umap/static/umap/locale/tr.json +5 -2
- umap/static/umap/locale/uk_UA.json +5 -2
- umap/static/umap/locale/vi.json +5 -2
- umap/static/umap/locale/vi_VN.json +5 -2
- umap/static/umap/locale/zh.json +5 -2
- umap/static/umap/locale/zh_CN.json +5 -2
- umap/static/umap/locale/zh_TW.Big5.json +5 -2
- umap/static/umap/locale/zh_TW.json +5 -2
- umap/static/umap/map.css +8 -9
- umap/static/umap/vars.css +10 -0
- umap/static/umap/vendors/dompurify/purify.es.js +5 -59
- umap/static/umap/vendors/dompurify/purify.es.mjs.map +1 -1
- umap/static/umap/vendors/formbuilder/Leaflet.FormBuilder.js +2 -2
- umap/storage.py +1 -1
- umap/tests/integration/test_map_preview.py +36 -2
- umap/tests/test_views.py +2 -2
- umap/views.py +3 -2
- {umap_project-2.4.1.dist-info → umap_project-2.4.2.dist-info}/METADATA +2 -2
- {umap_project-2.4.1.dist-info → umap_project-2.4.2.dist-info}/RECORD +110 -110
- {umap_project-2.4.1.dist-info → umap_project-2.4.2.dist-info}/WHEEL +0 -0
- {umap_project-2.4.1.dist-info → umap_project-2.4.2.dist-info}/entry_points.txt +0 -0
- {umap_project-2.4.1.dist-info → umap_project-2.4.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -102,7 +102,6 @@
|
|
|
102
102
|
"Define link to open in a new window on polygon click.": "指定點多邊形連結時開新視窗。",
|
|
103
103
|
"define": "定義",
|
|
104
104
|
"Delay between two transitions when in play mode": "播放模式下兩個轉換間會延遲",
|
|
105
|
-
"Delete all layers": "刪除所有圖層",
|
|
106
105
|
"Delete layer": "刪除圖層",
|
|
107
106
|
"Delete this feature": "刪除此圖徵",
|
|
108
107
|
"Delete this property on all the features": "從所有圖徵中刪除此屬性",
|
|
@@ -481,5 +480,9 @@
|
|
|
481
480
|
"Only geometry centers": "Only geometry centers",
|
|
482
481
|
"Search area": "Search area",
|
|
483
482
|
"Type area name, or let empty to load data in current map view": "Type area name, or let empty to load data in current map view",
|
|
484
|
-
"Please define an expression for the query first": "Please define an expression for the query first"
|
|
483
|
+
"Please define an expression for the query first": "Please define an expression for the query first",
|
|
484
|
+
"Data successfully imported!": "Data successfully imported!",
|
|
485
|
+
"My Dashboard ({username})": "My Dashboard ({username})",
|
|
486
|
+
"Clear data": "Clear data",
|
|
487
|
+
"Remove layers": "Remove layers"
|
|
485
488
|
}
|
umap/static/umap/map.css
CHANGED
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
ul.photon-autocomplete {
|
|
229
229
|
position: absolute;
|
|
230
230
|
background-color: white;
|
|
231
|
-
z-index:
|
|
231
|
+
z-index: var(--zindex-autocomplete);
|
|
232
232
|
display: none;
|
|
233
233
|
}
|
|
234
234
|
.photon-autocomplete li {
|
|
@@ -579,7 +579,7 @@ ul.photon-autocomplete {
|
|
|
579
579
|
line-height: var(--control-size);
|
|
580
580
|
cursor: auto;
|
|
581
581
|
border-bottom: 1px solid #222;
|
|
582
|
-
z-index:
|
|
582
|
+
z-index: var(--zindex-panels);
|
|
583
583
|
opacity: 0.98;
|
|
584
584
|
color: #fff;
|
|
585
585
|
display: flex;
|
|
@@ -672,7 +672,7 @@ ul.photon-autocomplete {
|
|
|
672
672
|
cursor: auto;
|
|
673
673
|
border-top: 1px solid var(--color-lightGray);
|
|
674
674
|
opacity: 0.93;
|
|
675
|
-
z-index:
|
|
675
|
+
z-index: var(--zindex-panels);
|
|
676
676
|
}
|
|
677
677
|
.umap-help {
|
|
678
678
|
font-style: italic;
|
|
@@ -1328,7 +1328,7 @@ span.popup-icon {
|
|
|
1328
1328
|
width: 2px;
|
|
1329
1329
|
}
|
|
1330
1330
|
.umap-icon-active {
|
|
1331
|
-
z-index:
|
|
1331
|
+
z-index: var(--zindex-icon-active)!important;
|
|
1332
1332
|
opacity: 1.0!important;
|
|
1333
1333
|
}
|
|
1334
1334
|
.umap-edit-enabled .readonly {
|
|
@@ -1352,15 +1352,14 @@ span.popup-icon {
|
|
|
1352
1352
|
-o-animation-delay: .2s;
|
|
1353
1353
|
animation-delay: .2s;
|
|
1354
1354
|
}
|
|
1355
|
-
.umap-loader
|
|
1356
|
-
{
|
|
1355
|
+
.umap-loader {
|
|
1357
1356
|
position: absolute;
|
|
1358
1357
|
display: none;
|
|
1359
1358
|
top: 0;
|
|
1360
1359
|
left: 0;
|
|
1361
1360
|
right: 0;
|
|
1362
1361
|
height: 4px;
|
|
1363
|
-
z-index:
|
|
1362
|
+
z-index: var(--zindex-loader);
|
|
1364
1363
|
background-color: #79c1c0 !important;
|
|
1365
1364
|
-webkit-transform: translateX(100%);
|
|
1366
1365
|
-moz-transform: translateX(100%);
|
|
@@ -1522,7 +1521,7 @@ span.popup-icon {
|
|
|
1522
1521
|
margin-left: 10px;
|
|
1523
1522
|
}
|
|
1524
1523
|
.leaflet-top {
|
|
1525
|
-
z-index:
|
|
1524
|
+
z-index: calc(var(--zindex-panels) + 1);
|
|
1526
1525
|
}
|
|
1527
1526
|
.leaflet-popup-content {
|
|
1528
1527
|
min-width: 200px;
|
|
@@ -1594,7 +1593,7 @@ span.popup-icon {
|
|
|
1594
1593
|
text-align: center;
|
|
1595
1594
|
}
|
|
1596
1595
|
.leaflet-inplace-toolbar {
|
|
1597
|
-
z-index:
|
|
1596
|
+
z-index: var(--zindex-toolbar)!important;
|
|
1598
1597
|
}
|
|
1599
1598
|
.leaflet-inplace-toolbar a {
|
|
1600
1599
|
background-image: url('./img/16-white.svg');
|
umap/static/umap/vars.css
CHANGED
|
@@ -36,6 +36,16 @@
|
|
|
36
36
|
--box-padding: 20px;
|
|
37
37
|
--box-margin: 14px;
|
|
38
38
|
--text-margin: 7px;
|
|
39
|
+
|
|
40
|
+
/* z-indexes (leaflet CSS sets the map at 400 by default) */
|
|
41
|
+
--zindex-alert: 500;
|
|
42
|
+
--zindex-loader: 490;
|
|
43
|
+
--zindex-toolbar: 480;
|
|
44
|
+
--zindex-autocomplete: 470;
|
|
45
|
+
--zindex-dialog: 460;
|
|
46
|
+
--zindex-icon-active: 450;
|
|
47
|
+
--zindex-panels: 440;
|
|
48
|
+
--zindex-dragover: 410;
|
|
39
49
|
}
|
|
40
50
|
.dark {
|
|
41
51
|
--background-color: var(--color-darkGray);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @license DOMPurify 3.1.
|
|
1
|
+
/*! @license DOMPurify 3.1.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.5/LICENSE */
|
|
2
2
|
|
|
3
3
|
const {
|
|
4
4
|
entries,
|
|
@@ -48,7 +48,6 @@ const stringTrim = unapply(String.prototype.trim);
|
|
|
48
48
|
const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
|
|
49
49
|
const regExpTest = unapply(RegExp.prototype.test);
|
|
50
50
|
const typeErrorCreate = unconstruct(TypeError);
|
|
51
|
-
const numberIsNaN = unapply(Number.isNaN);
|
|
52
51
|
|
|
53
52
|
/**
|
|
54
53
|
* Creates a new function that calls the given function with a specified thisArg and arguments.
|
|
@@ -197,7 +196,7 @@ const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mgly
|
|
|
197
196
|
const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
|
|
198
197
|
const text = freeze(['#text']);
|
|
199
198
|
|
|
200
|
-
const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
|
|
199
|
+
const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
|
|
201
200
|
const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
|
|
202
201
|
const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
|
|
203
202
|
const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
|
|
@@ -301,7 +300,7 @@ function createDOMPurify() {
|
|
|
301
300
|
* Version label, exposed for easier checks
|
|
302
301
|
* if DOMPurify is up to date or not
|
|
303
302
|
*/
|
|
304
|
-
DOMPurify.version = '3.1.
|
|
303
|
+
DOMPurify.version = '3.1.5';
|
|
305
304
|
|
|
306
305
|
/**
|
|
307
306
|
* Array of elements that DOMPurify removed during sanitation.
|
|
@@ -534,9 +533,6 @@ function createDOMPurify() {
|
|
|
534
533
|
/* Keep a reference to config to pass to hooks */
|
|
535
534
|
let CONFIG = null;
|
|
536
535
|
|
|
537
|
-
/* Specify the maximum element nesting depth to prevent mXSS */
|
|
538
|
-
const MAX_NESTING_DEPTH = 255;
|
|
539
|
-
|
|
540
536
|
/* Ideally, do not touch anything below this line */
|
|
541
537
|
/* ______________________________________________ */
|
|
542
538
|
|
|
@@ -947,11 +943,7 @@ function createDOMPurify() {
|
|
|
947
943
|
* @return {Boolean} true if clobbered, false if safe
|
|
948
944
|
*/
|
|
949
945
|
const _isClobbered = function _isClobbered(elm) {
|
|
950
|
-
return elm instanceof HTMLFormElement && (
|
|
951
|
-
// eslint-disable-next-line unicorn/no-typeof-undefined
|
|
952
|
-
typeof elm.__depth !== 'undefined' && typeof elm.__depth !== 'number' ||
|
|
953
|
-
// eslint-disable-next-line unicorn/no-typeof-undefined
|
|
954
|
-
typeof elm.__removalCount !== 'undefined' && typeof elm.__removalCount !== 'number' || typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');
|
|
946
|
+
return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');
|
|
955
947
|
};
|
|
956
948
|
|
|
957
949
|
/**
|
|
@@ -1102,7 +1094,7 @@ function createDOMPurify() {
|
|
|
1102
1094
|
// eslint-disable-next-line complexity
|
|
1103
1095
|
const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
|
|
1104
1096
|
/* Make sure attribute cannot clobber */
|
|
1105
|
-
if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement
|
|
1097
|
+
if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
|
|
1106
1098
|
return false;
|
|
1107
1099
|
}
|
|
1108
1100
|
|
|
@@ -1293,32 +1285,9 @@ function createDOMPurify() {
|
|
|
1293
1285
|
if (_sanitizeElements(shadowNode)) {
|
|
1294
1286
|
continue;
|
|
1295
1287
|
}
|
|
1296
|
-
const parentNode = getParentNode(shadowNode);
|
|
1297
|
-
|
|
1298
|
-
/* Set the nesting depth of an element */
|
|
1299
|
-
if (shadowNode.nodeType === NODE_TYPE.element) {
|
|
1300
|
-
if (parentNode && parentNode.__depth) {
|
|
1301
|
-
/*
|
|
1302
|
-
We want the depth of the node in the original tree, which can
|
|
1303
|
-
change when it's removed from its parent.
|
|
1304
|
-
*/
|
|
1305
|
-
shadowNode.__depth = (shadowNode.__removalCount || 0) + parentNode.__depth + 1;
|
|
1306
|
-
} else {
|
|
1307
|
-
shadowNode.__depth = 1;
|
|
1308
|
-
}
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
/*
|
|
1312
|
-
* Remove an element if nested too deeply to avoid mXSS
|
|
1313
|
-
* or if the __depth might have been tampered with
|
|
1314
|
-
*/
|
|
1315
|
-
if (shadowNode.__depth >= MAX_NESTING_DEPTH || shadowNode.__depth < 0 || numberIsNaN(shadowNode.__depth)) {
|
|
1316
|
-
_forceRemove(shadowNode);
|
|
1317
|
-
}
|
|
1318
1288
|
|
|
1319
1289
|
/* Deep shadow DOM detected */
|
|
1320
1290
|
if (shadowNode.content instanceof DocumentFragment) {
|
|
1321
|
-
shadowNode.content.__depth = shadowNode.__depth;
|
|
1322
1291
|
_sanitizeShadowDOM(shadowNode.content);
|
|
1323
1292
|
}
|
|
1324
1293
|
|
|
@@ -1434,32 +1403,9 @@ function createDOMPurify() {
|
|
|
1434
1403
|
if (_sanitizeElements(currentNode)) {
|
|
1435
1404
|
continue;
|
|
1436
1405
|
}
|
|
1437
|
-
const parentNode = getParentNode(currentNode);
|
|
1438
|
-
|
|
1439
|
-
/* Set the nesting depth of an element */
|
|
1440
|
-
if (currentNode.nodeType === NODE_TYPE.element) {
|
|
1441
|
-
if (parentNode && parentNode.__depth) {
|
|
1442
|
-
/*
|
|
1443
|
-
We want the depth of the node in the original tree, which can
|
|
1444
|
-
change when it's removed from its parent.
|
|
1445
|
-
*/
|
|
1446
|
-
currentNode.__depth = (currentNode.__removalCount || 0) + parentNode.__depth + 1;
|
|
1447
|
-
} else {
|
|
1448
|
-
currentNode.__depth = 1;
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
/*
|
|
1453
|
-
* Remove an element if nested too deeply to avoid mXSS
|
|
1454
|
-
* or if the __depth might have been tampered with
|
|
1455
|
-
*/
|
|
1456
|
-
if (currentNode.__depth >= MAX_NESTING_DEPTH || currentNode.__depth < 0 || numberIsNaN(currentNode.__depth)) {
|
|
1457
|
-
_forceRemove(currentNode);
|
|
1458
|
-
}
|
|
1459
1406
|
|
|
1460
1407
|
/* Shadow DOM detected, sanitize it */
|
|
1461
1408
|
if (currentNode.content instanceof DocumentFragment) {
|
|
1462
|
-
currentNode.content.__depth = currentNode.__depth;
|
|
1463
1409
|
_sanitizeShadowDOM(currentNode.content);
|
|
1464
1410
|
}
|
|
1465
1411
|
|