提交 26655d0d 编写于 作者: 蔡祥熠

Merge branch 'fix/Process.textarea_break_by_parenthesis' into 'wrdp'

Merge of fix/Process.textarea_break_by_parenthesis 修复textarea只读状态下内容有尖括号的时候内容被截断的问题 to wrdp

See merge request o2oa/o2oa!1589

(cherry picked from commit 3aba5144782d76f044a9d4b96df3289342e5df3c)

290321a6 修复textarea只读状态下内容有尖括号的时候内容被截断的问题
上级 c0473cf6
......@@ -26,9 +26,11 @@ MWF.xApplication.process.Xform.Textarea = MWF.APPTextarea = new Class({
this._setBusinessData(value);
if (this.node.getFirst()) this.node.getFirst().set("value", value || "");
if (this.readonly || this.json.isReadonly){
var reg = new RegExp("\n","g");
var text = value.replace(reg,"<br/>");
this.node.set("html", text);
var reg = new RegExp("\n","g");
var reg2 = new RegExp("\u003c","g"); //尖括号转义,否则内容会截断
var reg3 = new RegExp("\u003e","g");
var text = value.replace(reg2,"&lt").replace(reg3,"&gt").replace(reg,"<br/>");
this.node.set("html", text);
}
},
_resetNodeEdit: function(){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册