Merge branch 'hotfix/v4.1.2' of https://github.com/ONLYOFFICE/web-apps into hotfix/v4.1.2

This commit is contained in:
Alexander Yuzhin 2016-09-16 11:05:16 +03:00
commit 36f49fa837
2 changed files with 16 additions and 10 deletions

View file

@ -201,7 +201,7 @@ define([
if (typeof value == 'object') { if (typeof value == 'object') {
_.each(value, function(obj) { _.each(value, function(obj) {
if (typeof obj === 'string') if (typeof obj === 'string')
changetext += (' ' + obj); changetext += (' ' + Common.Utils.String.htmlEncode(obj));
else { else {
switch (obj) { switch (obj) {
case 0: case 0:
@ -220,7 +220,7 @@ define([
} }
}) })
} else if (typeof value === 'string') { } else if (typeof value === 'string') {
changetext += (' ' + value); changetext += (' ' + Common.Utils.String.htmlEncode(value));
} }
break; break;
case Asc.c_oAscRevisionsChangeType.TextRem: case Asc.c_oAscRevisionsChangeType.TextRem:
@ -228,7 +228,7 @@ define([
if (typeof value == 'object') { if (typeof value == 'object') {
_.each(value, function(obj) { _.each(value, function(obj) {
if (typeof obj === 'string') if (typeof obj === 'string')
changetext += (' ' + obj); changetext += (' ' + Common.Utils.String.htmlEncode(obj));
else { else {
switch (obj) { switch (obj) {
case 0: case 0:
@ -247,7 +247,7 @@ define([
} }
}) })
} else if (typeof value === 'string') { } else if (typeof value === 'string') {
changetext += (' ' + value); changetext += (' ' + Common.Utils.String.htmlEncode(value));
} }
break; break;
case Asc.c_oAscRevisionsChangeType.ParaAdd: case Asc.c_oAscRevisionsChangeType.ParaAdd:

View file

@ -104,15 +104,21 @@ define([
this.$window.find('.tool').hide(); this.$window.find('.tool').hide();
this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
if (this.type == Asc.c_oAscAdvancedOptionsID.DRM) { if (this.type == Asc.c_oAscAdvancedOptionsID.DRM) {
var me = this; this.inputPwd = new Common.UI.InputField({
me.inputPwd = new Common.UI.InputField({
el: $('#id-password-txt'), el: $('#id-password-txt'),
type: 'password', type: 'password',
allowBlank: false, allowBlank: false,
validateOnBlur: false validateOnBlur: false
}); });
} else this.$window.find('input').on('keypress', _.bind(this.onKeyPress, this));
} else {
var me = this;
this.initCodePages(); this.initCodePages();
this.onPrimary = function() {
me.onBtnClick();
return false;
};
}
} }
}, },
@ -138,9 +144,9 @@ define([
this.close(); this.close();
}, },
onPrimary: function() { onKeyPress: function(event) {
this.onBtnClick(); if (event.keyCode == Common.UI.Keys.RETURN)
return false; this.onBtnClick();
}, },
initCodePages: function () { initCodePages: function () {