@bookipi/htmlgenerator 1.1.23-alpha13 → 1.1.23-alpha14
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.
- package/dist/index.js +66 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +66 -1
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -9416,7 +9416,72 @@ function sanitize(obj) {
|
|
|
9416
9416
|
var val = objarr[1];
|
|
9417
9417
|
|
|
9418
9418
|
if (typeof val === "string" || val instanceof String) {
|
|
9419
|
-
return [objarr[0], sanitizeHtml(objarr[1]
|
|
9419
|
+
return [objarr[0], sanitizeHtml(objarr[1], {
|
|
9420
|
+
allowedAttributes: {
|
|
9421
|
+
"*": ["style"]
|
|
9422
|
+
},
|
|
9423
|
+
allowedStyles: {
|
|
9424
|
+
"*": {
|
|
9425
|
+
color: [/^.*$/],
|
|
9426
|
+
direction: [/^.*$/],
|
|
9427
|
+
"letter-spacing": [/^.*$/],
|
|
9428
|
+
"line-height": [/^.*$/],
|
|
9429
|
+
"text-align": [/^.*$/],
|
|
9430
|
+
"text-decoration": [/^.*$/],
|
|
9431
|
+
"text-indent": [/^.*$/],
|
|
9432
|
+
"text-shadow": [/^.*$/],
|
|
9433
|
+
"text-transform": [/^.*$/],
|
|
9434
|
+
"text-overflow": [/^.*$/],
|
|
9435
|
+
"vertical-align": [/^.*$/],
|
|
9436
|
+
"word-spacing": [/^.*$/],
|
|
9437
|
+
font: [/^.*$/],
|
|
9438
|
+
"font-family": [/^.*$/],
|
|
9439
|
+
"font-size": [/^\d.*$/],
|
|
9440
|
+
"font-style": [/^.*$/],
|
|
9441
|
+
"font-variant": [/^.*$/],
|
|
9442
|
+
"font-weight": [/^.*$/],
|
|
9443
|
+
"list-style-type": [/^.*$/],
|
|
9444
|
+
height: [/^.*$/],
|
|
9445
|
+
width: [/^.*$/],
|
|
9446
|
+
margin: [/^.*$/],
|
|
9447
|
+
"margin-top": [/^.*$/],
|
|
9448
|
+
"margin-right": [/^.*$/],
|
|
9449
|
+
"margin-bottom": [/^.*$/],
|
|
9450
|
+
"margin-left": [/^.*$/],
|
|
9451
|
+
padding: [/^.*$/],
|
|
9452
|
+
"padding-top": [/^.*$/],
|
|
9453
|
+
"padding-right": [/^.*$/],
|
|
9454
|
+
"padding-bottom": [/^.*$/],
|
|
9455
|
+
"padding-left": [/^.*$/],
|
|
9456
|
+
border: [/^.*$/],
|
|
9457
|
+
"border-color": [/^.*$/],
|
|
9458
|
+
"border-style": [/^.*$/],
|
|
9459
|
+
"border-width": [/^.*$/],
|
|
9460
|
+
"border-radius": [/^.*$/],
|
|
9461
|
+
"border-bottom": [/^.*$/],
|
|
9462
|
+
"border-bottom-color": [/^.*$/],
|
|
9463
|
+
"border-bottom-style": [/^.*$/],
|
|
9464
|
+
"border-bottom-width": [/^.*$/],
|
|
9465
|
+
"border-left": [/^.*$/],
|
|
9466
|
+
"border-left-color": [/^.*$/],
|
|
9467
|
+
"border-left-style": [/^.*$/],
|
|
9468
|
+
"border-left-width": [/^.*$/],
|
|
9469
|
+
"border-right": [/^.*$/],
|
|
9470
|
+
"border-right-color": [/^.*$/],
|
|
9471
|
+
"border-right-style": [/^.*$/],
|
|
9472
|
+
"border-right-width": [/^.*$/],
|
|
9473
|
+
"border-top": [/^.*$/],
|
|
9474
|
+
"border-top-color": [/^.*$/],
|
|
9475
|
+
"border-top-style": [/^.*$/],
|
|
9476
|
+
"border-top-width": [/^.*$/],
|
|
9477
|
+
outline: [/^.*$/],
|
|
9478
|
+
"outline-color": [/^.*$/],
|
|
9479
|
+
"outline-offset": [/^.*$/],
|
|
9480
|
+
"outline-style": [/^.*$/],
|
|
9481
|
+
"outline-width": [/^.*$/]
|
|
9482
|
+
}
|
|
9483
|
+
}
|
|
9484
|
+
})];
|
|
9420
9485
|
} else if (typeof val === "object") {
|
|
9421
9486
|
return [objarr[0], sanitize(objarr[1])];
|
|
9422
9487
|
} else {
|