@innovastudio/contentbox 1.5.46 → 1.5.47
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@innovastudio/contentbox",
|
3
3
|
"type": "module",
|
4
|
-
"version": "1.5.
|
4
|
+
"version": "1.5.47",
|
5
5
|
"description": "",
|
6
6
|
"main": "public/contentbox/contentbox.esm.js",
|
7
7
|
"files": [
|
@@ -46,6 +46,7 @@
|
|
46
46
|
"webpack-dev-server": "^4.0.0"
|
47
47
|
},
|
48
48
|
"dependencies": {
|
49
|
+
"@innovastudio/contentbuilder": "^1.4.36",
|
49
50
|
"js-beautify": "^1.14.0"
|
50
51
|
}
|
51
52
|
}
|
@@ -19403,6 +19403,7 @@ class Util$1 {
|
|
19403
19403
|
// Render custom code block
|
19404
19404
|
html = decodeURIComponent(block.getAttribute('data-html'));
|
19405
19405
|
html = html.replace(/{id}/g, this.makeId());
|
19406
|
+
html = html.replace(/<script>/g, `${this.builder.nonce ? `<script nonce="${this.builder.nonce}">` : '<script>'}`);
|
19406
19407
|
|
19407
19408
|
for (var i = 1; i <= 20; i++) {
|
19408
19409
|
html = html.replace('[%HTML' + i + '%]', block.getAttribute('data-html-' + i) === undefined ? '' : decodeURIComponent(block.getAttribute('data-html-' + i))); //render editable area
|
@@ -21360,7 +21361,7 @@ class Util$1 {
|
|
21360
21361
|
${this.getFontPreview()}
|
21361
21362
|
</ul>
|
21362
21363
|
|
21363
|
-
<script>
|
21364
|
+
<script${this.builder.nonce ? ` nonce="${this.builder.nonce}"` : ''}>
|
21364
21365
|
|
21365
21366
|
const close = () => {
|
21366
21367
|
parent.focus();
|
@@ -31242,7 +31243,7 @@ class Snippets {
|
|
31242
31243
|
<ul class="is-design-list" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
|
31243
31244
|
</ul>
|
31244
31245
|
|
31245
|
-
<script>
|
31246
|
+
<script${this.builder.nonce ? ` nonce="${this.builder.nonce}"` : ''}>
|
31246
31247
|
|
31247
31248
|
var snippetPath = '${snippetPath}';
|
31248
31249
|
var snippetCategories = ${snippetCategoriesString};
|
@@ -68622,6 +68623,7 @@ class Module {
|
|
68622
68623
|
const iframe = moduleModal.querySelector('iframe');
|
68623
68624
|
let result = await fetch(this.builder.opts.modulePath + modulename + '.html');
|
68624
68625
|
result = await result.text();
|
68626
|
+
result = result.replace(/<script>/g, `${this.builder.nonce ? `<script nonce="${this.builder.nonce}">` : '<script>'}`);
|
68625
68627
|
let doc = iframe.contentWindow.document;
|
68626
68628
|
doc.open();
|
68627
68629
|
doc.write(result);
|
@@ -68643,6 +68645,7 @@ class Module {
|
|
68643
68645
|
|
68644
68646
|
let html = this.builderStuff.querySelector('#hidContentModuleCode').value;
|
68645
68647
|
html = html.replace(/{id}/g, this.util.makeId());
|
68648
|
+
html = html.replace(/<script>/g, `${this.builder.nonce ? `<script nonce="${this.builder.nonce}">` : '<script>'}`);
|
68646
68649
|
/* OLD
|
68647
68650
|
for(var i=1;i<=20;i++){ // OLD
|
68648
68651
|
html = html.replace('[%HTML'+i+'%]', (module.getAttribute('data-html-'+i) === undefined ? '' : decodeURIComponent(module.getAttribute('data-html-'+i))));//render editable area
|
@@ -68819,6 +68822,7 @@ class Code {
|
|
68819
68822
|
});
|
68820
68823
|
let html = decodeURIComponent(codeblock.getAttribute('data-html')); //html = html.replace(/{id}/g, this.util.makeId());
|
68821
68824
|
|
68825
|
+
html = html.replace(/<script>/g, `${this.builder.nonce ? `<script nonce="${this.builder.nonce}">` : '<script>'}`);
|
68822
68826
|
tmpbuilder.parentNode.removeChild(tmpbuilder); // Use existing modal
|
68823
68827
|
|
68824
68828
|
let viewhtml;
|
@@ -87845,7 +87849,7 @@ class Rte {
|
|
87845
87849
|
${this.getIcons()}
|
87846
87850
|
</div>
|
87847
87851
|
|
87848
|
-
<script>
|
87852
|
+
<script${this.builder.nonce ? ` nonce="${this.builder.nonce}"` : ''}>
|
87849
87853
|
const setValue = (elm) => {
|
87850
87854
|
if(!elm.className) elm = elm.childNodes[0];
|
87851
87855
|
parent._cb.addIcon(elm.className);
|
@@ -93772,6 +93776,7 @@ class ContentBuilder {
|
|
93772
93776
|
// Render custom code block
|
93773
93777
|
html = decodeURIComponent(block.getAttribute('data-html'));
|
93774
93778
|
html = html.replace(/{id}/g, util.makeId());
|
93779
|
+
html = html.replace(/<script>/g, `${this.nonce ? `<script nonce="${this.nonce}">` : '<script>'}`);
|
93775
93780
|
|
93776
93781
|
for (var i = 1; i <= 20; i++) {
|
93777
93782
|
html = html.replace('[%HTML' + i + '%]', block.getAttribute('data-html-' + i) === undefined ? '' : decodeURIComponent(block.getAttribute('data-html-' + i))); //render editable area
|
@@ -96400,6 +96405,7 @@ class ContentBuilder {
|
|
96400
96405
|
// Render custom code block
|
96401
96406
|
html = decodeURIComponent(block.getAttribute('data-html'));
|
96402
96407
|
html = html.replace(/{id}/g, this.util.makeId());
|
96408
|
+
html = html.replace(/<script>/g, `${this.nonce ? `<script nonce="${this.nonce}">` : '<script>'}`);
|
96403
96409
|
|
96404
96410
|
for (var i = 1; i <= 20; i++) {
|
96405
96411
|
html = html.replace('[%HTML' + i + '%]', block.getAttribute('data-html-' + i) === undefined ? '' : decodeURIComponent(block.getAttribute('data-html-' + i))); //render editable area
|