splitValue/html entites

This commit is contained in:
j 2016-01-06 00:13:14 +05:30
parent 8ab81cf886
commit d1b9e965f5

View file

@ -485,7 +485,7 @@ oml.ui.infoView = function(identifyData) {
clickLink: oml.clickLink, clickLink: oml.clickLink,
editable: isEditable, editable: isEditable,
format: function(value) { format: function(value) {
return formatValue(value.split('; '), 'author'); return formatValue(splitValue(value), 'author');
}, },
placeholder: formatLight(Ox._('Unknown Author')), placeholder: formatLight(Ox._('Unknown Author')),
tooltip: isEditable ? oml.getEditTooltip() : '', tooltip: isEditable ? oml.getEditTooltip() : '',
@ -524,7 +524,7 @@ oml.ui.infoView = function(identifyData) {
format: function(value) { format: function(value) {
return formatValue( return formatValue(
Ox.contains(arrayKeys, key) Ox.contains(arrayKeys, key)
? value.split('; ') : value, ? splitValue(value) : value,
key key
); );
}, },
@ -562,7 +562,7 @@ oml.ui.infoView = function(identifyData) {
editable: isEditable, editable: isEditable,
format: function(value) { format: function(value) {
return key == 'language' return key == 'language'
? formatValue(value.split('; '), key) ? formatValue(splitValue(value), key)
: value; : value;
}, },
placeholder: formatLight('unknown'), placeholder: formatLight('unknown'),
@ -725,7 +725,7 @@ oml.ui.infoView = function(identifyData) {
if (value != data[key]) { if (value != data[key]) {
var edit = {id: data.id}; var edit = {id: data.id};
if (Ox.contains(arrayKeys, key)) { if (Ox.contains(arrayKeys, key)) {
edit[key] = value ? value.split('; ') : []; edit[key] = value ? splitValue(value) : [];
} else { } else {
edit[key] = value; edit[key] = value;
} }
@ -746,6 +746,10 @@ oml.ui.infoView = function(identifyData) {
}); });
function splitValue(value) {
return Ox.decodeHTMLEntities(value).split('; ');
}
}; };
if (!identifyData) { if (!identifyData) {