提交 da6bd6c7 编写于 作者: 蔡祥熠

Merge branch 'fix/notice_setHtml' into 'wrdp'

Merge of fix/notice_setHtml 允许openWork传入只读参数,notice增加了过滤html的代码  to wrdp

See merge request o2oa/o2oa!6360
......@@ -933,6 +933,10 @@ var mBox = new Class({
this[where || 'content'].grab($(content) || $$('.' + content));
if($(content)) $(content).setStyle('display', '');
} else if(content != null) {
content = content.replace(/(?:<script[\s\S]*?)(?:(?:<\/script>)|(?:\/>))/gmi, '')
content = content.replace(/<[^>]+/gmi, function(match){
return match.replace(/ on\w+=[\"\'\S][^"]*[\"\'\S]/gmi, '').replace(/javascript/gmi, '');
});
this[where || 'content'].set('html', content);
}
}
......
......@@ -933,6 +933,10 @@ var mBox = new Class({
this[where || 'content'].grab($(content) || $$('.' + content));
if($(content)) $(content).setStyle('display', '');
} else if(content != null) {
content = content.replace(/(?:<script[\s\S]*?)(?:(?:<\/script>)|(?:\/>))/gmi, '')
content = content.replace(/<[^>]+/gmi, function(match){
return match.replace(/ on\w+=[\"\'\S][^"]*[\"\'\S]/gmi, '').replace(/javascript/gmi, '');
});
this[where || 'content'].set('html', content);
}
}
......
......@@ -933,6 +933,10 @@ var mBox = new Class({
this[where || 'content'].grab($(content) || $$('.' + content));
if($(content)) $(content).setStyle('display', '');
} else if(content != null) {
content = content.replace(/(?:<script[\s\S]*?)(?:(?:<\/script>)|(?:\/>))/gmi, '')
content = content.replace(/<[^>]+/gmi, function(match){
return match.replace(/ on\w+=[\"\'\S][^"]*[\"\'\S]/gmi, '').replace(/javascript/gmi, '');
});
this[where || 'content'].set('html', content);
}
}
......
......@@ -33,6 +33,7 @@ MWF.xApplication.process.Work.Main = new Class({
});
this.lp = MWF.xApplication.process.Work.LP;
if (!this.status) {
if( this.options.readonly === "true" )this.options.readonly=true;
} else {
this.options.workId = this.status.workId;
this.options.workCompletedId = this.status.workCompletedId;
......@@ -685,6 +686,8 @@ MWF.xApplication.process.Work.Main = new Class({
// },
openWork: function(){
if (this.form){
if( this.options.readonly )this.readonly = true;
//this.readonly = true;
//if (this.currentTask) {
// this.readonly = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册