From 9a29530cecaddc1b584ce7baa379dd0a8823715a Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 27 Oct 2023 10:58:08 +0800 Subject: [PATCH] Exclude `function` parameters in querystrings. --- .../bootstrap/modal-manager.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js index e524881176..1907ec9e23 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js @@ -134,8 +134,15 @@ $.validator.defaults.ignore = ''; //TODO: Would be better if we can apply only f _args = args || {}; + var argsWithoutFunc = {}; + for (a in _args) { + if (_args.hasOwnProperty(a) && typeof _args[a] !== 'function') { + argsWithoutFunc[a] = _args[a]; + } + } + _createContainer(_modalId) - .load(options.viewUrl, $.param(_args), function (response, status, xhr) { + .load(options.viewUrl, $.param(argsWithoutFunc), function (response, status, xhr) { if (status === "error") { //TODO: Handle! return;