@maptiler/sdk 4.2.0 → 4.2.1

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.
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Sanitize an untrusted HTML string, such as the attribution a remote TileJSON asks the map to display.
3
+ *
4
+ * Only the elements in `ALLOWED_TAGS` and the attributes in `ALLOWED_ATTRIBUTES` survive; anything else is
5
+ * dropped along with its subtree. An allow list is used rather than a list of known-dangerous markup because
6
+ * the latter silently permits whatever it has not heard of yet, including markup added to HTML after it was
7
+ * written.
8
+ *
9
+ * The sanitized nodes are returned rather than a string: serializing and re-parsing is not a round trip, so
10
+ * a string result lets carefully nested markup mutate into a different - and no longer sanitized - tree.
11
+ */
12
+ export declare function sanitizeHTML(str: string): DocumentFragment;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptiler/sdk",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "The Javascript & TypeScript map SDK tailored for MapTiler Cloud",
5
5
  "author": "MapTiler",
6
6
  "module": "dist/maptiler-sdk.mjs",