diff --git a/babel-plugin-expose-private-functions-and-variables.js b/babel-plugin-expose-private-functions-and-variables.js index f0807e3397..41ad501fa5 100644 --- a/babel-plugin-expose-private-functions-and-variables.js +++ b/babel-plugin-expose-private-functions-and-variables.js @@ -80,6 +80,14 @@ module.exports = function ({types: t}) { ) ); + // replace all private function calls to window.x.x.x._._func() + path.traverse({ + CallExpression(callPath) { + const callee = callPath.node.callee; + if (t.isIdentifier(callee) && exports[callee.name]) + callPath.node.callee = createNestedMemberExpression([exports[callee.name], ...dir]); + } + }); } } } diff --git a/zkdoc/release-note b/zkdoc/release-note index 49005a5fd1..5e210b9a91 100644 --- a/zkdoc/release-note +++ b/zkdoc/release-note @@ -31,6 +31,7 @@ ZK 10.1.0 ZK-5798: Client MVVM: Content missing in Include ZK-5799: Javascript error when using Pdfviewer in Client MVVM ZK-5801: Client MVVM: switching apply template causing javascript error + ZK-5802: _listenFlex, _unlistenFlex declared on static member _ are used directly, cannot be overriden * Upgrade Notes + Remove Htmls.encodeJavaScript(), Strings.encodeJavaScript(), Strings.escape() with Strings.ESCAPE_JAVASCRIPT, and replace them with OWASP Java Encoder APIs instead.