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