[common] Edit utils
This commit is contained in:
parent
9444e39ff0
commit
c541a5023f
|
@ -572,7 +572,8 @@ Common.Utils.String = new (function() {
|
||||||
},
|
},
|
||||||
|
|
||||||
htmlEncode: function(string) {
|
htmlEncode: function(string) {
|
||||||
return _.escape(string);
|
//return _.escape(string);
|
||||||
|
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||||
},
|
},
|
||||||
|
|
||||||
htmlDecode: function(string) {
|
htmlDecode: function(string) {
|
||||||
|
|
Loading…
Reference in a new issue