shaka-video-element 0.7.1 → 0.7.2
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.
|
@@ -32078,11 +32078,14 @@ function serializeAttributes(attrs) {
|
|
|
32078
32078
|
for (const key in attrs) {
|
|
32079
32079
|
if (!Attributes.includes(key)) continue;
|
|
32080
32080
|
const value = attrs[key];
|
|
32081
|
-
if (value === "") html += ` ${key}`;
|
|
32082
|
-
else html += ` ${key}="${value}"`;
|
|
32081
|
+
if (value === "") html += ` ${escapeHtml(key)}`;
|
|
32082
|
+
else html += ` ${escapeHtml(key)}="${escapeHtml(`${value}`)}"`;
|
|
32083
32083
|
}
|
|
32084
32084
|
return html;
|
|
32085
32085
|
}
|
|
32086
|
+
function escapeHtml(str) {
|
|
32087
|
+
return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/`/g, "`");
|
|
32088
|
+
}
|
|
32086
32089
|
function namedNodeMapToObject(namedNodeMap) {
|
|
32087
32090
|
const obj = {};
|
|
32088
32091
|
for (const attr of namedNodeMap) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shaka-video-element",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "Custom element (web component) for Shaka Player",
|
|
5
5
|
"author": "@muxinc",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"build": "run-s build:*"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"custom-media-element": "^1.4.
|
|
55
|
+
"custom-media-element": "^1.4.7",
|
|
56
56
|
"media-tracks": "^0.3.5",
|
|
57
57
|
"shaka-player": "~4.15.4"
|
|
58
58
|
},
|