This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch feat-share in repository https://gitbox.apache.org/repos/asf/echarts-examples.git
commit d7a18e35afeccbe176b44f372d70f02ba5d4f0ec Author: plainheart <y...@all-my-life.cn> AuthorDate: Sun May 1 22:41:50 2022 +0800 fix sandbox scripts can't be injected in production --- src/editor/sandbox/index.js | 2 +- src/editor/sandbox/srcdoc.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor/sandbox/index.js b/src/editor/sandbox/index.js index cec82b26..1e06c128 100644 --- a/src/editor/sandbox/index.js +++ b/src/editor/sandbox/index.js @@ -84,7 +84,7 @@ export function createSandbox( .replace('__LANG__', document.documentElement.lang || 'en') .replace('__CSP__', sandbox.csp) .replace( - '<!--SCRIPTS-->', + '__SCRIPTS__', scripts .map((script) => script.content diff --git a/src/editor/sandbox/srcdoc.html b/src/editor/sandbox/srcdoc.html index e7ffd881..0d5e7a40 100644 --- a/src/editor/sandbox/srcdoc.html +++ b/src/editor/sandbox/srcdoc.html @@ -68,6 +68,6 @@ <script src="https://cdn.jsdelivr.net/npm/jquery"></script> <script src="https://cdn.jsdelivr.net/npm/seedrandom@3.0.5/seedrandom.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/acorn@8.7.1/dist/acorn.min.js"></script> - <!--SCRIPTS--> + __SCRIPTS__ </body> </html> --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org