Эх сурвалжийг харах

通过o2.filterUrl方法,过滤请求和链接

huqi 5 жил өмнө
parent
commit
3887a70800
36 өөрчлөгдсөн 119 нэмэгдсэн , 118 устгасан
  1. 2 2
      o2web/source/o2_core/o2/xAction/services/x_file_assemble_control.js
  2. 1 1
      o2web/source/x_component_AppCenter/Main.js
  3. 4 4
      o2web/source/x_component_Attendance/Actions/RestActions.js
  4. 1 1
      o2web/source/x_component_Attendance/ImportExplorer.js
  5. 2 2
      o2web/source/x_component_CRM/Main.js
  6. 3 3
      o2web/source/x_component_Common/Main.js
  7. 1 1
      o2web/source/x_component_Execution/StatForm.js
  8. 1 1
      o2web/source/x_component_Execution/WorkDeploy.js
  9. 2 2
      o2web/source/x_component_Execution/WorkStat.js
  10. 2 2
      o2web/source/x_component_File/Main.js
  11. 3 3
      o2web/source/x_component_ForumDocument/Vote.js
  12. 2 2
      o2web/source/x_component_Homepage/FileContent.js
  13. 2 2
      o2web/source/x_component_Meeting/Common.js
  14. 2 2
      o2web/source/x_component_OKR/Actions/RestActions.js
  15. 3 3
      o2web/source/x_component_Setting/SettingIndexUI.js
  16. 1 1
      o2web/source/x_component_Strategy/ImportForm.js
  17. 2 2
      o2web/source/x_component_TeamWork/TaskAttachmentList.js
  18. 3 3
      o2web/source/x_component_Template/MDomItem.js
  19. 3 3
      o2web/source/x_component_Template/sample/mobilePortal_second(手机门户二级页面通用).js
  20. 2 2
      o2web/source/x_component_Template/sample/test2.js
  21. 3 3
      o2web/source/x_component_cms_Xform/Attachment.js
  22. 3 3
      o2web/source/x_component_cms_Xform/Form.js
  23. 2 2
      o2web/source/x_component_cms_Xform/Office.js
  24. 1 1
      o2web/source/x_component_portal_PageDesigner/Module/Page.js
  25. 1 1
      o2web/source/x_component_portal_WidgetDesigner/Main.js
  26. 1 1
      o2web/source/x_component_process_Work/Processor.js
  27. 5 5
      o2web/source/x_component_process_Xform/Attachment.js
  28. 8 8
      o2web/source/x_component_process_Xform/Form.js
  29. 2 2
      o2web/source/x_component_process_Xform/Office.js
  30. 2 2
      o2web/source/x_component_query_TableDesigner/Table.js
  31. 2 2
      o2web/source/x_component_query_ViewDesigner/View.js
  32. 12 11
      o2web/source/x_desktop/js/base.js
  33. 11 11
      o2web/source/x_desktop/js/base_simple.js
  34. 10 10
      o2web/source/x_desktop/js/base_simple_anonymous.js
  35. 10 10
      o2web/source/x_desktop/js/xbase.js
  36. 4 4
      o2web/source/x_desktop/js/zhengwuDingdingSso.js

+ 2 - 2
o2web/source/o2_core/o2/xAction/services/x_file_assemble_control.js

@@ -3,7 +3,7 @@ MWF.xAction.RestActions.Action["x_file_assemble_control"] = new Class({
     getAttachment: function(id){
         var url= this.designAddress+this.fileActions.getAttachmentData.uri;
         url = url.replace(/{id}/g, id);
-        window.open(url);
+        window.open(o2.filterUrl(url));
     },
     saveFolder: function(data, success, failure){
         if (data.id){
@@ -31,4 +31,4 @@ MWF.xAction.RestActions.Action["x_file_assemble_control"] = new Class({
         height = height ||0;
         this.action.invoke({"name": "getBase64Code","async": async,"parameter": {"id": id, "height" : height, "width" : width},"success": success,"failure": failure});
     }
-});
+});

+ 1 - 1
o2web/source/x_component_AppCenter/Main.js

@@ -441,7 +441,7 @@ MWF.xApplication.AppCenter.Exporter = new Class({
 
                         if (this.mask) this.mask.hide();
                         this.dlg.close();
-                        window.open(this.app.actions.action.address+uri);
+                        window.open(o2.filterUrl(this.app.actions.action.address+uri));
 
                         MWF.release(this);
                     }.bind(this), function(xhr, text, error){

+ 4 - 4
o2web/source/x_component_Attendance/Actions/RestActions.js

@@ -104,7 +104,7 @@ MWF.xApplication.Attendance.Actions.RestActions = new Class({
             var url = this.action.actions.exportSelfHoliday.uri;
             url = url.replace("{startdate}", startdate);
             url = url.replace("{enddate}", enddate);
-            window.open(this.action.address+url , "_blank");
+            window.open(o2.filterUrl(this.action.address+url) , "_blank");
         }.bind(this));
     },
     listSelfHolidayFilterNext : function( id, count,  filterData, success,failure, async){
@@ -198,7 +198,7 @@ MWF.xApplication.Attendance.Actions.RestActions = new Class({
         this.action.getActions(function(){
             var url = this.action.actions.getAttachmentStream.uri;
             url = url.replace("{id}", encodeURIComponent(id));
-            window.open(this.action.address+url);
+            window.open(o2.filterUrl(this.action.address)+url);
         }.bind(this));
     },
     //importAttachment: function(file_id, success, failure){
@@ -222,7 +222,7 @@ MWF.xApplication.Attendance.Actions.RestActions = new Class({
             var url = this.action.actions.exportAbnormalAttachment.uri;
             url = url.replace("{year}", year);
             url = url.replace("{month}", month);
-            window.open(this.action.address+url , "_blank");
+            window.open(o2.filterUrl(this.action.address+url) , "_blank");
         }.bind(this));
         //this.action.invoke({"name": "exportAbnormalAttachment", "parameter": {"year": year, "month": month },"success": success,"failure": failure});
     },
@@ -350,4 +350,4 @@ MWF.xApplication.Attendance.Actions.RestActions = new Class({
         this.action.invoke({"name": "deleteWorkplace","async": async, "parameter": {"id": id}, "success": success,	"failure": failure});
     }
 
-});
+});

+ 1 - 1
o2web/source/x_component_Attendance/ImportExplorer.js

@@ -90,7 +90,7 @@ MWF.xApplication.Attendance.ImportExplorer = new Class({
         }.bind(this))
     },
     downloadTemplate : function(){
-        window.open( this.path + encodeURIComponent( "dataTemplate.xls" ), "_blank" )
+        window.open( o2.filterUrl(this.path + encodeURIComponent( "dataTemplate.xls" ), "_blank" ))
     },
     showDescription: function( el ){
         if( this.descriptionNode ){

+ 2 - 2
o2web/source/x_component_CRM/Main.js

@@ -36,8 +36,8 @@ MWF.xApplication.CRM.Main = new Class({
 		this.desktop.openBrowserStatus = (this.recordStatus) ? this.recordStatus() : null;
 		var status = (this.desktop.openBrowserStatus) ? JSON.encode(this.desktop.openBrowserStatus) : "";
 
-		var url = "app.html?app="+this.options.name+"&status="+status;
-		window.open(url, "_blank");
+		var url = "../x_desktop/app.html?app="+this.options.name+"&status="+status;
+		window.open(o2.filterUrl(url), "_blank");
 		if (!this.inBrowser)
 			try{
 				this.close();

+ 3 - 3
o2web/source/x_component_Common/Main.js

@@ -292,14 +292,14 @@ MWF.xApplication.Common.Main = new Class({
 		this.desktop.openBrowserStatus = (this.recordStatus) ? this.recordStatus() : null;
 		var status = (this.desktop.openBrowserStatus) ? JSON.encode(this.desktop.openBrowserStatus) : "";
 
-		var url = "app.html?app=" + this.options.name + "&status=" + status;
-		window.open(url, "_blank");
+		var url = "../x_desktop/app.html?app=" + this.options.name + "&status=" + status;
+		window.open(o2.filterUrl(url), "_blank");
 		if (!this.inBrowser) if (!noClose) this.close();
 	},
 	openInNewWindow: function () {
 		this.desktop.openBrowserApp = this.options.name;
 		this.desktop.openBrowserStatus = (this.recordStatus) ? this.recordStatus() : null;
-		window.open("app.html", "_blank");
+		window.open(o2.filterUrl("../x_desktop/app.html"), "_blank");
 		if (!this.inBrowser) this.close();
 	},
 	setContentEvent: function () {

+ 1 - 1
o2web/source/x_component_Execution/StatForm.js

@@ -514,7 +514,7 @@ MWF.xApplication.Execution.StatForm = new Class({
                             var address = this.actions.action.address;
 
                             var url = address + "/jaxrs/export/statisticreportcontent/"+json.data.id+"/stream"
-                            window.open(url)
+                            window.open(o2.filterUrl(url))
                         }
                     }.bind(this),
                     function(xhr,text,error){

+ 1 - 1
o2web/source/x_component_Execution/WorkDeploy.js

@@ -259,7 +259,7 @@ MWF.xApplication.Execution.WorkDeploy = new Class({
                 }).inject(this.importDiv);
                 this.importTemplateDiv.addEvents({
                     "click":function(){
-                        window.open("../x_component_Execution/baseWork.xls")
+                        window.open(o2.filterUrl("../x_component_Execution/baseWork.xls"))
                     }.bind(this)
                 });
                 this.importTitleDiv = new Element("div.importTitleDiv",{

+ 2 - 2
o2web/source/x_component_Execution/WorkStat.js

@@ -682,7 +682,7 @@ MWF.xApplication.Execution.WorkStat = new Class({
                 if(json.data && json.data.id){
                     var address = this.actions.action.address;
                     var url = address + "/jaxrs/export/statisticreportcontent/"+json.data.id+"/stream";
-                    window.open(url)
+                    window.open(o2.filterUrl(url))
                 }
             }.bind(this),
             function(xhr,text,error){
@@ -1056,7 +1056,7 @@ MWF.xApplication.Execution.WorkStat = new Class({
                     if(json.data && json.data.id){
                         var address = this.actions.action.address;
                         var url = address + "/jaxrs/export/statisticreportcontent/"+json.data.id+"/stream";
-                        window.open(url)
+                        window.open(o2.filterUrl(url))
                     }
                 }.bind(this),
                 function(xhr,text,error){

+ 2 - 2
o2web/source/x_component_File/Main.js

@@ -340,13 +340,13 @@ MWF.xApplication.File.Main = new Class({
 
     openAttachment: function(e, node, attachment){
         this.restActions.getFileUrl(attachment[0].data.id, function(url){
-            window.open(url);
+            window.open(o2.filterUrl(url));
         });
     },
     downloadAttachment: function(e, node, attachments){
         attachments.each(function(attachment){
             this.restActions.getFileDownloadUrl(attachment.data.id, function(url){
-                window.open(url);
+                window.open(o2.filterUrl(url));
             });
         }.bind(this));
     },

+ 3 - 3
o2web/source/x_component_ForumDocument/Vote.js

@@ -231,7 +231,7 @@ MWF.xApplication.ForumDocument.Vote = new Class({
                             "styles": this.css.optionPicture
                         }).inject(area);
                         img.addEvent("click", function () {
-                            window.open(MWF.xDesktop.getImageSrc(this.id), "_blank");
+                            window.open(o2.filterUrl(MWF.xDesktop.getImageSrc(this.id)), "_blank");
                         }.bind({id: n.optionPictureId}));
                     }
 
@@ -381,7 +381,7 @@ MWF.xApplication.ForumDocument.Vote = new Class({
                         "styles" : this.css.optionPicture
                     }).inject( area );
                     img.addEvent("click",function(){
-                        window.open( MWF.xDesktop.getImageSrc( this.id ), "_blank" );
+                        window.open( o2.filterUrl(MWF.xDesktop.getImageSrc( this.id )), "_blank" );
                     }.bind({id: n.optionPictureId}))
                 }
             }else{
@@ -913,4 +913,4 @@ MWF.xApplication.ForumDocument.VoteRecordDocument = new Class({
     _postCreateDocumentNode: function( itemNode, itemData ){
         if (itemData.votorName) new MWF.widget.O2Person({"name" : itemData.votorName }, itemNode,  {"style": "xform"});
     }
-});
+});

+ 2 - 2
o2web/source/x_component_Homepage/FileContent.js

@@ -145,12 +145,12 @@ MWF.xApplication.Homepage.FileContent.File = new Class({
     },
     openAttachment: function(d){
         o2.Actions.get("x_file_assemble_control").getFileDownloadUrl(d.id, function(url){
-            window.open(url);
+            window.open(o2.filterUrl(url));
         });
     },
     downloadAttachment: function(d){
         o2.Actions.get("x_file_assemble_control").getFileUrl(d.id, function(url){
-            window.open(url);
+            window.open(o2.filterUrl(url));
         });
     },
     open: function(e, d){

+ 2 - 2
o2web/source/x_component_Meeting/Common.js

@@ -896,7 +896,7 @@ MWF.xApplication.Meeting.MeetingForm = new Class({
                 },
                 events : {
                     click : function(){
-                        window.open( "../x_component_Meeting/$Main/qrPrint.html?meeting="+this.data.id, "_blank" );
+                        window.open(o2.filterUrl("../x_component_Meeting/$Main/qrPrint.html?meeting="+this.data.id), "_blank" );
                     }.bind(this)
                 }
             }).inject( this.qrCodeArea );
@@ -2247,4 +2247,4 @@ MWF.xApplication.Meeting.SideBar = new Class({
         this.app.node.removeEvent("mousedown", this.hideFun);
         this.node.destory();
     }
-});
+});

+ 2 - 2
o2web/source/x_component_OKR/Actions/RestActions.js

@@ -71,7 +71,7 @@ MWF.xApplication.OKR.Actions.RestActions = new Class({
         this.action.getActions(function(){
             var url = this.action.actions.getAttachmentStream.uri;
             url = url.replace("{id}", encodeURIComponent(id));
-            window.open(this.action.address+url);
+            window.open(o2.filterUrl(this.action.address+url));
         }.bind(this));
     },
 
@@ -121,4 +121,4 @@ MWF.xApplication.OKR.Actions.RestActions = new Class({
         this.action.invoke({"name": "getWorksById", "parameter": {"id": id },"success": success,"failure": failure,"async": async});
     }
 
-});
+});

+ 3 - 3
o2web/source/x_component_Setting/SettingIndexUI.js

@@ -146,7 +146,7 @@ MWF.xApplication.Setting.UIIndexDocument.Item = new Class({
             this.previewMaskNode.setStyles({"width": ""+size.x+"px", "height": ""+size.y+"px", "z-index": zidx});
             this.previewMaskNode.addEvents({
                 "click": function(e){
-                    window.open("../x_desktop/index.html?style="+this.data.id+"&styletype="+((this.data.name=="default") ? "default" : "custom"));
+                    window.open(o2.filterUrl("../x_desktop/index.html?style="+this.data.id+"&styletype="+((this.data.name=="default") ? "default" : "custom")));
                     e.stopPropagation();
                 }.bind(this),
                 "mousedown": function(e){e.stopPropagation();},
@@ -296,7 +296,7 @@ MWF.xApplication.Setting.UIIndexDocument.Editor = new Class({
             this.previewMaskNode.setStyles({"width": ""+size.x+"px", "height": ""+size.y+"px", "z-index": zidx});
             this.previewMaskNode.addEvents({
                 "click": function(e){
-                    window.open("../x_desktop/index.html?style="+this.item.data.id+"&styletype="+((this.item.data.name=="default") ? "default" : "custom"));
+                    window.open(o2.filterUrl("../x_desktop/index.html?style="+this.item.data.id+"&styletype="+((this.item.data.name=="default") ? "default" : "custom")));
                     e.stopPropagation();
                 }.bind(this),
                 "mousedown": function(e){e.stopPropagation();},
@@ -310,4 +310,4 @@ MWF.xApplication.Setting.UIIndexDocument.Editor = new Class({
         }.bind(this));
 
     }
-});
+});

+ 1 - 1
o2web/source/x_component_Strategy/ImportForm.js

@@ -190,7 +190,7 @@ MWF.xApplication.Strategy.ImportForm = new Class({
                                 this.app.notice(json.data.describe, "error");
                                 var address = this.actions.action.address;
                                 var url = address+"/jaxrs/measuresimport/result/flag/"+json.data.flag;
-                                window.open(url);
+                                window.open(o2.filterUrl(url));
                             }
 
                         }.bind(this),function(xhr,text,error){

+ 2 - 2
o2web/source/x_component_TeamWork/TaskAttachmentList.js

@@ -354,7 +354,7 @@ MWF.xApplication.TeamWork.TaskAttachmentList.More = new Class({
         var address = this.rootActions.AttachmentAction.action.address;
         var url = this.rootActions.AttachmentAction.action.actions.downLoad.uri;
         url = url.replace("{id}", encodeURIComponent(attachment.id));debugger;
-        window.open(address+url)
+        window.open(o2.filterUrl(address+url));
 
     },
     deleteAttachment: function (attachment) {
@@ -375,4 +375,4 @@ MWF.xApplication.TeamWork.TaskAttachmentList.More = new Class({
             this.close();
         }.bind(this));
     }
-});
+});

+ 3 - 3
o2web/source/x_component_Template/MDomItem.js

@@ -2457,7 +2457,7 @@ MDomItem.ImageClipper = new Class({
                 "src" : MWF.xDesktop.getImageSrc( value )
             }).inject( this.imageWrap || parent );
             this.image.addEvent("click",function(){
-                window.open( MWF.xDesktop.getImageSrc( this.imageId ), "_blank" );
+                window.open( o2.filterUrl(MWF.xDesktop.getImageSrc( this.imageId )), "_blank" );
             }.bind(this));
             if( styles.imageStyle )this.image.setStyles( styles.imageStyle );
         }
@@ -2486,7 +2486,7 @@ MDomItem.ImageClipper = new Class({
                         }).inject( this.imageWrap || parent, "top" );
                         if( styles.imageStyle )this.image.setStyles( styles.imageStyle );
                         this.image.addEvent("click",function(){
-                            window.open( MWF.xDesktop.getImageSrc( this.imageId ), "_blank" );
+                            window.open( o2.filterUrl(MWF.xDesktop.getImageSrc( this.imageId )), "_blank" );
                         }.bind(this));
                         this.imageId = this.module.imageId = this.clipper.imageId;
                         if( this.options.validImmediately ){
@@ -3014,4 +3014,4 @@ MDomItem.File = new Class({
     getErrorText : function(){
 
     }
-});
+});

+ 3 - 3
o2web/source/x_component_Template/sample/mobilePortal_second(手机门户二级页面通用).js

@@ -208,7 +208,7 @@ var MobileProcessStarter = new Class({
         if( this.processId ){
             href = href + "&processId=" + this.processId
         }
-        window.location = href + "&option=" + JSON.stringify(option) + "&redirectlink=" + redirectlink;
+        window.location = o2.filterUrl(href + "&option=" + JSON.stringify(option) + "&redirectlink=" + redirectlink);
     },
     gotoSelectIdentityPage : function(){
         var option = {
@@ -223,7 +223,7 @@ var MobileProcessStarter = new Class({
         }else{
             redirectlink = encodeURIComponent(redirectlink);
         }
-        window.location = "../x_desktop/appMobile.html?app=portal.Portal&appid=" + this.process.application + "&processId=" + this.process.id + "&option=" + JSON.stringify(option) + "&redirectlink=" + redirectlink;
+        window.location = o2.filterUrl("../x_desktop/appMobile.html?app=portal.Portal&appid=" + this.process.application + "&processId=" + this.process.id + "&option=" + JSON.stringify(option) + "&redirectlink=" + redirectlink);
     },
     loadSelectProcessLayout : function( applactionId, processId ){
         this.applactionId = applactionId;
@@ -889,4 +889,4 @@ MobileProcessStarter.Identity = new Class({
         this.dutyTextNode.set({"text": dutyTextList.join(", "), "title": dutyTitleList.join(", ")});
 
     }
-});
+});

+ 2 - 2
o2web/source/x_component_Template/sample/test2.js

@@ -1066,7 +1066,7 @@ this.define("openMinder", function( workId ){
     if( layout.desktop.openApplication ){
         layout.desktop.openApplication(null, "portal.Portal", options)
     }else{
-        window.open( "../x_desktop/app.html?app=portal.Portal&option="+ JSON.stringify(options) );
+        window.open( o2.filterUrl("../x_desktop/app.html?app=portal.Portal&option="+ JSON.stringify(options)) );
     }
 });
 
@@ -1827,4 +1827,4 @@ var StatJson = new Class({
             }
         }
     }
-});
+});

+ 3 - 3
o2web/source/x_component_cms_Xform/Attachment.js

@@ -402,7 +402,7 @@ MWF.xApplication.cms.Xform.Attachment = MWF.CMSAttachment = new Class({
                         //移动端 企业微信 钉钉 用本地打开 防止弹出自带浏览器 无权限问题
                         this.form.documentAction.getAttachmentUrl(att.data.id, this.form.businessData.document.id, function (url) {
                             var xtoken = Cookie.read("x-token");
-                            window.location = url + "?x-token=" + xtoken;
+                            window.location = o2.filterUrl(url + "?x-token=" + xtoken);
                         });
                     } else {
                         this.form.documentAction.getAttachmentStream(att.data.id, this.form.businessData.document.id);
@@ -423,7 +423,7 @@ MWF.xApplication.cms.Xform.Attachment = MWF.CMSAttachment = new Class({
                         //移动端 企业微信 钉钉 用本地打开 防止弹出自带浏览器 无权限问题
                         this.form.documentAction.getAttachmentUrl(att.data.id, this.form.businessData.document.id, function (url) {
                             var xtoken = Cookie.read("x-token");
-                            window.location = url + "?x-token=" + xtoken;
+                            window.location = o2.filterUrl(url + "?x-token=" + xtoken);
                         });
                     } else {
                         this.form.documentAction.getAttachmentData(att.data.id, this.form.businessData.document.id);
@@ -497,4 +497,4 @@ MWF.xApplication.cms.Xform.Attachment = MWF.CMSAttachment = new Class({
         }
         return true;
     }
-}); 
+}); 

+ 3 - 3
o2web/source/x_component_cms_Xform/Form.js

@@ -382,7 +382,7 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class({
             form = this.json.id;
             if (this.json.printForm && this.json.printForm !== "none") form = this.json.printForm;
         }
-        window.open("../x_desktop/printcmsdoc.html?documentid=" + this.businessData.document.id + "&form=" + form);
+        window.open(o2.filterUrl("../x_desktop/printcmsdoc.html?documentid=" + this.businessData.document.id + "&form=" + form));
     },
 
     formValidation: function (status) {
@@ -619,7 +619,7 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class({
             form = this.json.id;
             if (this.json.printForm) form = this.json.printForm;
         }
-        window.open("../x_desktop/printWork.html?workid=" + this.businessData.work.id + "&app=" + this.businessData.work.application + "&form=" + form);
+        window.open(o2.filterUrl("../x_desktop/printWork.html?workid=" + this.businessData.work.id + "&app=" + this.businessData.work.application + "&form=" + form));
     },
     openWindow: function (form, app) {
         var form = form;
@@ -664,4 +664,4 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class({
 
 
 
-});
+});

+ 2 - 2
o2web/source/x_component_cms_Xform/Office.js

@@ -381,10 +381,10 @@ MWF.xApplication.cms.Xform.Office = MWF.CMSOffice =  new Class({
                     }else if(window.webkit){
                         window.webkit.messageHandlers.openDocument.postMessage(url);
                     }else{
-                        window.open(url);
+                        window.open(o2.filterUrl(url));
                     }
                 }
             }.bind(this));
 
 	}
-}); 
+}); 

+ 1 - 1
o2web/source/x_component_portal_PageDesigner/Module/Page.js

@@ -641,7 +641,7 @@ MWF.xApplication.portal.PageDesigner.Module.Page = MWF.PCPage = new Class({
 	},
 	preview: function(){
         var url = "../x_desktop/portal.html?id="+this.json.application+"&page="+this.json.id;
-        window.open(url);
+        window.open(o2.filterUrl(url));
         // MWF.xDesktop.requireApp("process.FormDesigner", "Preview", function(){
         //
          //    if (this.options.mode=="Mobile"){

+ 1 - 1
o2web/source/x_component_portal_WidgetDesigner/Main.js

@@ -90,6 +90,6 @@ MWF.xApplication.portal.WidgetDesigner.Main = new Class({
                 this.savePage();
                 //this.page.preview();
                 var url = "../x_desktop/portal.html?id="+this.application.id+"&widget="+this.page.json.id;
-                window.open(url);
+                window.open(o2.filterUrl(url));
         }
 });

+ 1 - 1
o2web/source/x_component_process_Work/Processor.js

@@ -1622,7 +1622,7 @@ MWF.xApplication.process.Work.Processor = new Class({
             o2.Actions.load("x_organization_assemble_authentication").AuthenticationAction.switchUser({"credential": ( _self.task.personDn || _self.task.person ) }, function(){
                 var text = MWF.xApplication.process.Work.LP.managerLoginSuccess.replace("{user}", user );
                 MWF.xDesktop.notice("success", {x: "right", y:"top"}, text );
-                window.open("../x_desktop/work.html?workid="+_self.task.work);
+                window.open(o2.filterUrl("../x_desktop/work.html?workid="+_self.task.work));
             }.bind(this));
             this.close();
         }, function () {

+ 5 - 5
o2web/source/x_component_process_Xform/Attachment.js

@@ -1421,7 +1421,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
                         //移动端 企业微信 钉钉 用本地打开 防止弹出自带浏览器 无权限问题
                         this.form.workAction.getAttachmentUrl(att.data.id, this.form.businessData.work.id, function (url) {
                             var xtoken = Cookie.read("x-token");
-                            window.location = url + "?x-token=" + xtoken;
+                            window.location = o2.filterUrl(url + "?x-token=" + xtoken);
                         });
                     } else {
                         this.form.workAction.getAttachmentStream(att.data.id, this.form.businessData.work.id);
@@ -1439,7 +1439,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
                         //移动端 企业微信 钉钉 用本地打开 防止弹出自带浏览器 无权限问题
                         this.form.workAction.getAttachmentWorkcompletedUrl(att.data.id, this.form.businessData.workCompleted.id, function (url) {
                             var xtoken = Cookie.read("x-token");
-                            window.location = url + "?x-token=" + xtoken;
+                            window.location = o2.filterUrl(url + "?x-token=" + xtoken);
                         });
                     } else {
                         this.form.workAction.getWorkcompletedAttachmentStream(att.data.id, this.form.businessData.workCompleted.id);
@@ -1460,7 +1460,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
                         //移动端 企业微信 钉钉 用本地打开 防止弹出自带浏览器 无权限问题
                         this.form.workAction.getAttachmentUrl(att.data.id, this.form.businessData.work.id, function (url) {
                             var xtoken = Cookie.read("x-token");
-                            window.location = url + "?x-token=" + xtoken;
+                            window.location = o2.filterUrl(url + "?x-token=" + xtoken);
                         });
                     } else {
                         this.form.workAction.getAttachmentData(att.data.id, this.form.businessData.work.id);
@@ -1480,7 +1480,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
                         //移动端 企业微信 钉钉 用本地打开 防止弹出自带浏览器 无权限问题
                         this.form.workAction.getAttachmentWorkcompletedUrl(att.data.id, ((this.form.businessData.workCompleted) ? this.form.businessData.workCompleted.id : this.form.businessData.work.id), function (url) {
                             var xtoken = Cookie.read("x-token");
-                            window.location = url + "?x-token=" + xtoken;
+                            window.location = o2.filterUrl(url + "?x-token=" + xtoken);
                         });
                     } else {
                         this.form.workAction.getWorkcompletedAttachmentData(att.data.id, ((this.form.businessData.workCompleted) ? this.form.businessData.workCompleted.id : this.form.businessData.work.id));
@@ -1638,4 +1638,4 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
         return true;
     }
 
-}); 
+}); 

+ 8 - 8
o2web/source/x_component_process_Xform/Form.js

@@ -2673,7 +2673,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
         htmlFormId = htmlFormId.replace("#", "%23");
         var url = "/x_processplatform_assemble_surface/jaxrs/attachment/batch/download/work/" + this.businessData.work.id + "/site/(0)/stream";
         url = o2.filterUrl(o2.Actions.getHost("x_processplatform_assemble_surface") + url);
-        window.open( url + "?fileName=&flag=" + htmlFormId);
+        window.open( o2.filterUrl(url + "?fileName=&flag=" + htmlFormId));
     },
     resetWork: function () {
         if (!this.businessData.control["allowReset"]) {
@@ -3613,10 +3613,10 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
         }
         if (this.businessData.workCompleted) {
             var application = app || this.businessData.workCompleted.application;
-            window.open("../x_desktop/printWork.html?workCompletedId=" + this.businessData.workCompleted.id + "&app=" + application + "&form=" + form);
+            window.open(o2.filterUrl("../x_desktop/printWork.html?workCompletedId=" + this.businessData.workCompleted.id + "&app=" + application + "&form=" + form));
         } else {
             var application = app || this.businessData.work.application;
-            window.open("../x_desktop/printWork.html?workid=" + this.businessData.work.id + "&app=" + application + "&form=" + form);
+            window.open(o2.filterUrl("../x_desktop/printWork.html?workid=" + this.businessData.work.id + "&app=" + application + "&form=" + form));
         }
     },
     readedWork: function (e) {
@@ -3664,10 +3664,10 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
         }
         if (this.businessData.workCompleted) {
             var application = app || this.businessData.workCompleted.application;
-            window.open("../x_desktop/printWork.html?workCompletedId=" + this.businessData.workCompleted.id + "&app=" + application + "&form=" + form);
+            window.open(o2.filterUrl("../x_desktop/printWork.html?workCompletedId=" + this.businessData.workCompleted.id + "&app=" + application + "&form=" + form));
         } else {
             var application = app || this.businessData.work.application;
-            window.open("../x_desktop/printWork.html?workid=" + this.businessData.work.id + "&app=" + application + "&form=" + form);
+            window.open(o2.filterUrl("../x_desktop/printWork.html?workid=" + this.businessData.work.id + "&app=" + application + "&form=" + form));
         }
         //window.open("../x_desktop/printWork.html?workid="+this.businessData.work.id+"&app="+this.businessData.work.application+"&form="+form);
     },
@@ -3732,9 +3732,9 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
                     history.replaceState(null, "work", redirectlink);
                     redirectlink.toURI().go();
                 } else {
-                    window.location = "appMobile.html?app=process.TaskCenter";
-                    history.replaceState(null, "work", "../x_desktop/appMobile.html?app=process.TaskCenter");
-                    "appMobile.html?app=process.TaskCenter".toURI().go();
+                    window.location = o2.filterUrl("../x_desktop/appMobile.html?app=process.TaskCenter");
+                    history.replaceState(null, "work", o2.filterUrl("../x_desktop/appMobile.html?app=process.TaskCenter"));
+                    o2.filterUrl("../x_desktop/appMobile.html?app=process.TaskCenter").toURI().go();
                 }
             }
         }

+ 2 - 2
o2web/source/x_component_process_Xform/Office.js

@@ -1481,10 +1481,10 @@ MWF.xApplication.process.Xform.Office = MWF.APPOffice =  new Class({
                     }else if(window.webkit){
                         window.webkit.messageHandlers.openDocument.postMessage(url);
                     }else{
-                        window.open(url);
+                        window.open(o2.filterUrl(url));
                     }
                 }
             }.bind(this));
 
 	}
-}); 
+}); 

+ 2 - 2
o2web/source/x_component_query_TableDesigner/Table.js

@@ -539,7 +539,7 @@ MWF.xApplication.query.TableDesigner.Table = new Class({
 
             url = url.replace("{tableFlag}",_self.data.id);
             url = url.replace("{count}",1000);
-            window.open(url)
+            window.open(o2.filterUrl(url))
             this.close();
         }, function(){
             this.close();
@@ -1180,4 +1180,4 @@ MWF.xApplication.query.TableDesigner.Table.JPQLRunner = new Class({
             "maxResults": maxResults.toInt()
         }
     }
-});
+});

+ 2 - 2
o2web/source/x_component_query_ViewDesigner/View.js

@@ -646,7 +646,7 @@ MWF.xApplication.query.ViewDesigner.View = new Class({
                 id : this.data.application,
                 viewId : this.data.id
             });
-            window.open(url,"_blank");
+            window.open(o2.filterUrl(url),"_blank");
         }.bind(this));
     },
     saveSilence: function(callback){
@@ -2222,4 +2222,4 @@ MWF.xApplication.query.ViewDesigner.View.Paging = new Class({
         }
     }
 
-});
+});

+ 12 - 11
o2web/source/x_desktop/js/base.js

@@ -126,9 +126,10 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
             redirectlink = encodeURIComponent(redirectlink);
         }
         if (options.workId) {
-            window.location = "../x_desktop/workmobilewithaction.html?workid=" + options.workId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink;
+            o2.
+            window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workid=" + options.workId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink);
         } else if (options.workCompletedId) {
-            window.location = "../x_desktop/workmobilewithaction.html?workcompletedid=" + options.workCompletedId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink;
+            window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workcompletedid=" + options.workCompletedId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink);
         }
     };
     var _openWork = function (options) {
@@ -143,7 +144,7 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2CmsDocument) {
             window.webkit.messageHandlers.openO2CmsDocument.postMessage({ "docId": options.documentId, "docTitle": title });
         } else {
-            window.location = "../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
     var _openCms = function (appNames, options, statusObj) {
@@ -153,7 +154,7 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2CmsApplication) {
             window.webkit.messageHandlers.openO2CmsApplication.postMessage(options.columnId);
         } else {
-            window.location = "../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
     var _openMeeting = function (appNames, options, statusObj) {
@@ -163,7 +164,7 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2Meeting) {
             window.webkit.messageHandlers.openO2Meeting.postMessage("");
         } else {
-            window.location = "../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
 
@@ -174,7 +175,7 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2Calendar) {
             window.webkit.messageHandlers.openO2Calendar.postMessage("");
         } else {
-            window.location = "../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
     var _openTaskCenter = function (appNames, options, statusObj) {
@@ -188,7 +189,7 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2WorkSpace) {
             window.webkit.messageHandlers.openO2WorkSpace.postMessage(tab);
         } else {
-            window.location = "../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
 
@@ -216,7 +217,7 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
                 var uri = new URI(window.location.href);
                 var optionsStr = uri.getData("option");
                 var statusStr = uri.getData("status");
-                window.location = "../x_desktop/appMobile.html?app=" + appNames + "&option=" + (optionsStr || "") + "&status=" + (statusStr || "") + ((layout.debugger) ? "&debugger" : "");
+                window.location = o2.filterUrl("../x_desktop/appMobile.html?app=" + appNames + "&option=" + (optionsStr || "") + "&status=" + (statusStr || "") + ((layout.debugger) ? "&debugger" : ""));
         }
     };
 
@@ -237,9 +238,9 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
                 var par = "app=" + encodeURIComponent(appNames) + "&status=" + encodeURIComponent((statusObj) ? JSON.encode(statusObj) : "") + "&option=" + encodeURIComponent((options) ? JSON.encode(options) : "");
 
                 if (layout.app.$openWithSelf) {
-                    return window.location = "../x_desktop/app.html?" + par + ((layout.debugger) ? "&debugger" : "");
+                    return window.location = o2.filterUrl("../x_desktop/app.html?" + par + ((layout.debugger) ? "&debugger" : ""));
                 } else {
-                    return window.open("../x_desktop/app.html?" + par + ((layout.debugger) ? "&debugger" : ""), par);
+                    return window.open(o2.filterUrl("../x_desktop/app.html?" + par + ((layout.debugger) ? "&debugger" : "")), par);
                 }
             }
         } else {
@@ -269,7 +270,7 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
         if (status) statusStr = JSON.encode(status);
 
         var port = uri.get("port");
-        window.location = uri.get("scheme") + "://" + uri.get("host") + ((port) ? ":" + port + "/" : "") + uri.get("directory ") + "?app=" + encodeURIComponent(appNames) + "&status=" + encodeURIComponent(statusStr) + "&option=" + encodeURIComponent((options) ? JSON.encode(options) : "") + ((layout.debugger) ? "&debugger" : "");
+        window.location = o2.filterUrl(uri.get("scheme") + "://" + uri.get("host") + ((port) ? ":" + port + "/" : "") + uri.get("directory ") + "?app=" + encodeURIComponent(appNames) + "&status=" + encodeURIComponent(statusStr) + "&option=" + encodeURIComponent((options) ? JSON.encode(options) : "") + ((layout.debugger) ? "&debugger" : ""));
     };
 
     layout.load = function (appNames, options, statusObj) {

+ 11 - 11
o2web/source/x_desktop/js/base_simple.js

@@ -317,11 +317,11 @@ o2.addReady(function () {
             redirectlink = encodeURIComponent(redirectlink);
         }
         if (options.workId) {
-            window.location = "workmobilewithaction.html?workid=" + options.workId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink;
+            window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workid=" + options.workId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink);
         } else if (options.workCompletedId) {
-            window.location = "workmobilewithaction.html?workcompletedid=" + options.workCompletedId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink;
+            window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workcompletedid=" + options.workCompletedId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink);
         }else if (options.draft){
-            window.location = "workmobilewithaction.html?draft=" + JSON.stringify(options.draft) + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink;
+            window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?draft=" + JSON.stringify(options.draft) + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink);
         }else {
             console.log("open work 错误,缺少参数!");
         }
@@ -338,7 +338,7 @@ o2.addReady(function () {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2CmsDocument) {
             window.webkit.messageHandlers.openO2CmsDocument.postMessage({ "docId": options.documentId, "docTitle": title });
         } else {
-            window.location = "appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
     var _openCms = function (appNames, options, statusObj) {
@@ -348,7 +348,7 @@ o2.addReady(function () {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2CmsApplication) {
             window.webkit.messageHandlers.openO2CmsApplication.postMessage(options.columnId);
         } else {
-            window.location = "appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
     var _openMeeting = function (appNames, options, statusObj) {
@@ -358,7 +358,7 @@ o2.addReady(function () {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2Meeting) {
             window.webkit.messageHandlers.openO2Meeting.postMessage("");
         } else {
-            window.location = "appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
 
@@ -369,7 +369,7 @@ o2.addReady(function () {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2Calendar) {
             window.webkit.messageHandlers.openO2Calendar.postMessage("");
         } else {
-            window.location = "appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
     var _openTaskCenter = function (appNames, options, statusObj) {
@@ -383,7 +383,7 @@ o2.addReady(function () {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2WorkSpace) {
             window.webkit.messageHandlers.openO2WorkSpace.postMessage(tab);
         } else {
-            window.location = "appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
 
@@ -411,7 +411,7 @@ o2.addReady(function () {
                 var uri = new URI(window.location.href);
                 var optionsStr = uri.getData("option");
                 var statusStr = uri.getData("status");
-                window.location = "appMobile.html?app=" + appNames + "&option=" + (optionsStr || "") + "&status=" + (statusStr || "") + ((layout.debugger) ? "&debugger" : "");
+                window.location = o2.filterUrl("../x_desktop/appMobile.html?app=" + appNames + "&option=" + (optionsStr || "") + "&status=" + (statusStr || "") + ((layout.debugger) ? "&debugger" : ""));
         }
     };
 
@@ -424,9 +424,9 @@ o2.addReady(function () {
 
                 debugger;
                 if (layout.app.$openWithSelf) {
-                    return window.location = "app.html?" + par + ((layout.debugger) ? "&debugger" : "");
+                    return window.location = o2.filterUrl("../x_desktop/app.html?" + par + ((layout.debugger) ? "&debugger" : ""));
                 } else {
-                    return window.open("app.html?" + par + ((layout.debugger) ? "&debugger" : ""), par);
+                    return window.open(o2.filterUrl("../x_desktop/app.html?" + par + ((layout.debugger) ? "&debugger" : "")), par);
                 }
             }
         } else {

+ 10 - 10
o2web/source/x_desktop/js/base_simple_anonymous.js

@@ -239,9 +239,9 @@ o2.addReady(function () {
             redirectlink = encodeURIComponent(redirectlink);
         }
         if (options.workId) {
-            window.location = "workmobilewithaction.html?workid=" + options.workId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink;
+            window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workid=" + options.workId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink);
         } else if (options.workCompletedId) {
-            window.location = "workmobilewithaction.html?workcompletedid=" + options.workCompletedId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink;
+            window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workcompletedid=" + options.workCompletedId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink);
         }
     };
     var _openWork = function (options) {
@@ -256,7 +256,7 @@ o2.addReady(function () {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2CmsDocument) {
             window.webkit.messageHandlers.openO2CmsDocument.postMessage({ "docId": options.documentId, "docTitle": title });
         } else {
-            window.location = "appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
     var _openCms = function (appNames, options, statusObj) {
@@ -266,7 +266,7 @@ o2.addReady(function () {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2CmsApplication) {
             window.webkit.messageHandlers.openO2CmsApplication.postMessage(options.columnId);
         } else {
-            window.location = "appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
     var _openMeeting = function (appNames, options, statusObj) {
@@ -276,7 +276,7 @@ o2.addReady(function () {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2Meeting) {
             window.webkit.messageHandlers.openO2Meeting.postMessage("");
         } else {
-            window.location = "appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
 
@@ -287,7 +287,7 @@ o2.addReady(function () {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2Calendar) {
             window.webkit.messageHandlers.openO2Calendar.postMessage("");
         } else {
-            window.location = "appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
     var _openTaskCenter = function (appNames, options, statusObj) {
@@ -301,7 +301,7 @@ o2.addReady(function () {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2WorkSpace) {
             window.webkit.messageHandlers.openO2WorkSpace.postMessage(tab);
         } else {
-            window.location = "appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
 
@@ -329,7 +329,7 @@ o2.addReady(function () {
                 var uri = new URI(window.location.href);
                 var optionsStr = uri.getData("option");
                 var statusStr = uri.getData("status");
-                window.location = "appMobile.html?app=" + appNames + "&option=" + (optionsStr || "") + "&status=" + (statusStr || "") + ((layout.debugger) ? "&debugger" : "");
+                window.location = o2.filterUrl("../x_desktop/appMobile.html?app=" + appNames + "&option=" + (optionsStr || "") + "&status=" + (statusStr || "") + ((layout.debugger) ? "&debugger" : ""));
         }
     };
 
@@ -342,9 +342,9 @@ o2.addReady(function () {
 
                 debugger;
                 if (layout.app.$openWithSelf) {
-                    return window.location = "app.html?" + par + ((layout.debugger) ? "&debugger" : "");
+                    return window.location = o2.filterUrl("../x_desktop/app.html?" + par + ((layout.debugger) ? "&debugger" : ""));
                 } else {
-                    return window.open("app.html?" + par + ((layout.debugger) ? "&debugger" : ""), par);
+                    return window.open(o2.filterUrl("../x_desktop/app.html?" + par + ((layout.debugger) ? "&debugger" : "")), par);
                 }
             }
         } else {

+ 10 - 10
o2web/source/x_desktop/js/xbase.js

@@ -111,9 +111,9 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
             redirectlink = encodeURIComponent(redirectlink);
         }
         if (options.workId) {
-            window.location = "workmobilewithaction.html?workid=" + options.workId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink;
+            window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workid=" + options.workId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink);
         } else if (options.workCompletedId) {
-            window.location = "workmobilewithaction.html?workcompletedid=" + options.workCompletedId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink;
+            window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workcompletedid=" + options.workCompletedId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink);
         }
     };
     var _openWork = function (options) {
@@ -128,7 +128,7 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2CmsDocument) {
             window.webkit.messageHandlers.openO2CmsDocument.postMessage({ "docId": options.documentId, "docTitle": title });
         } else {
-            window.location = "appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
     var _openCms = function (appNames, options, statusObj) {
@@ -138,7 +138,7 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2CmsApplication) {
             window.webkit.messageHandlers.openO2CmsApplication.postMessage(options.columnId);
         } else {
-            window.location = "appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
     var _openMeeting = function (appNames, options, statusObj) {
@@ -148,7 +148,7 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2Meeting) {
             window.webkit.messageHandlers.openO2Meeting.postMessage("");
         } else {
-            window.location = "appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
 
@@ -159,7 +159,7 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2Calendar) {
             window.webkit.messageHandlers.openO2Calendar.postMessage("");
         } else {
-            window.location = "appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
     var _openTaskCenter = function (appNames, options, statusObj) {
@@ -173,7 +173,7 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
         } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.openO2WorkSpace) {
             window.webkit.messageHandlers.openO2WorkSpace.postMessage(tab);
         } else {
-            window.location = "appMobile.html?" + par + ((layout.debugger) ? "&debugger" : "");
+            window.location = o2.filterUrl("../x_desktop/appMobile.html?" + par + ((layout.debugger) ? "&debugger" : ""));
         }
     };
 
@@ -201,7 +201,7 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
                 var uri = new URI(window.location.href);
                 var optionsStr = uri.getData("option");
                 var statusStr = uri.getData("status");
-                window.location = "appMobile.html?app=" + appNames + "&option=" + (optionsStr || "") + "&status=" + (statusStr || "") + ((layout.debugger) ? "&debugger" : "");
+                window.location = o2.filterUrl("../x_desktop/appMobile.html?app=" + appNames + "&option=" + (optionsStr || "") + "&status=" + (statusStr || "") + ((layout.debugger) ? "&debugger" : ""));
         }
     };
 
@@ -213,9 +213,9 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
                 var par = "app=" + encodeURIComponent(appNames) + "&status=" + encodeURIComponent((statusObj) ? JSON.encode(statusObj) : "") + "&option=" + encodeURIComponent((options) ? JSON.encode(options) : "");
 
                 if (layout.app.$openWithSelf) {
-                    return window.location = "app.html?" + par + ((layout.debugger) ? "&debugger" : "");
+                    return window.location = o2.filterUrl("../x_desktop/app.html?" + par + ((layout.debugger) ? "&debugger" : ""));
                 } else {
-                    return window.open("app.html?" + par + ((layout.debugger) ? "&debugger" : ""), par);
+                    return window.open(o2.filterUrl("../x_desktop/app.html?" + par + ((layout.debugger) ? "&debugger" : "")), par);
                 }
             }
         } else {

+ 4 - 4
o2web/source/x_desktop/js/zhengwuDingdingSso.js

@@ -80,12 +80,12 @@ o2.addReady(function(){
                                 redirectlink = encodeURIComponent(redirectlink);
                             }
                             if( options.workId ){
-                                window.location = "workmobilewithaction.html?workid="+options.workId+"&redirectlink="+redirectlink;
+                                window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workid="+options.workId+"&redirectlink="+redirectlink);
                             }else if( options.workCompletedId ){
-                                window.location = "workmobilewithaction.html?workcompletedid="+options.workCompletedId+"&redirectlink="+redirectlink;
+                                window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workcompletedid="+options.workCompletedId+"&redirectlink="+redirectlink);
                             }
                         }else{
-                            window.location = "appMobile.html?app="+appNames+"&option="+(optionsStr || "")+"&status="+(statusStr || "");
+                            window.location = o2.filterUrl("../x_desktop/appMobile.html?app="+appNames+"&option="+(optionsStr || "")+"&status="+(statusStr || ""));
                         }
                     }else{
                         var appPath = appNames.split(".");
@@ -277,4 +277,4 @@ o2.addReady(function(){
 
         });
     });
-});
+});