encode more html entities

This commit is contained in:
Rolux 2016-01-08 14:07:34 +05:30
parent fea12d9f57
commit f173d50902
6 changed files with 14 additions and 13 deletions

View File

@ -39,15 +39,15 @@ oml.ui.browser = function() {
}).join(', ') + ')', }).join(', ') + ')',
WebkitTransform: 'rotate(45deg)' WebkitTransform: 'rotate(45deg)'
}) })
.html( .text(
ui.iconInfo == 'extension' ui.iconInfo == 'extension'
? data.extension.toUpperCase() ? data.extension.toUpperCase()
: Ox.formatValue(data.size, 'B') : Ox.formatValue(data.size, 'B')
) : null, ) : null,
height: height, height: height,
id: data.id, id: data.id,
info: info, info: Ox.encodeHTMLEntities(info),
title: data.title, title: Ox.encodeHTMLEntities(data.title),
url: '/' + data.id + '/' + ui.icons + '128.jpg?' + data.modified, url: '/' + data.id + '/' + ui.icons + '128.jpg?' + data.modified,
width: width width: width
}; };

View File

@ -28,6 +28,7 @@ oml.ui.folderList = function(options) {
width: 16 width: 16
}, },
{ {
format: Ox.encodeHTMLEntities,
id: 'name', id: 'name',
visible: true, visible: true,
width: ui.sidebarSize - 16 - 48, width: ui.sidebarSize - 16 - 48,

View File

@ -136,7 +136,7 @@ oml.ui.folders = function() {
'part.preferences': 'account' 'part.preferences': 'account'
}); });
} else { } else {
oml.UI.set({page: 'users'}) oml.UI.set({page: 'users'});
} }
} }
}) })

View File

@ -39,15 +39,15 @@ oml.ui.gridView = function() {
MozTransform: 'rotate(45deg)', MozTransform: 'rotate(45deg)',
WebkitTransform: 'rotate(45deg)' WebkitTransform: 'rotate(45deg)'
}) })
.html( .text(
ui.iconInfo == 'extension' ui.iconInfo == 'extension'
? data.extension.toUpperCase() ? data.extension.toUpperCase()
: Ox.formatValue(data.size, 'B') : Ox.formatValue(data.size, 'B')
) : null, ) : null,
height: height, height: height,
id: data.id, id: data.id,
info: info, info: Ox.encodeHTMLEntities(info),
title: data.title, title: Ox.encodeHTMLEntities(data.title),
url: '/' + data.id + '/' + ui.icons + '128.jpg?' + data.modified, url: '/' + data.id + '/' + ui.icons + '128.jpg?' + data.modified,
width: width width: width
}; };

View File

@ -43,19 +43,17 @@ oml.ui.info = function() {
.css({ .css({
fontWeight: 'bold' fontWeight: 'bold'
}) })
.html(data.title || '') .text(data.title || '')
.appendTo(that); .appendTo(that);
$('<div>') $('<div>')
.css({ .css({
fontWeight: 'bold' fontWeight: 'bold'
}) })
.html((data.author || []).join(', ')) .text((data.author || []).join(', '))
.appendTo(that); .appendTo(that);
$('<div>') $('<div>')
.css({marginTop: '8px'}) .css({marginTop: '8px'})
.html( .text(result.data.description || '')
Ox.encodeHTMLEntities(result.data.description || '')
)
.appendTo(that); .appendTo(that);
$('<div>') $('<div>')
.css({height: '16px'}) .css({height: '16px'})

View File

@ -13,7 +13,9 @@ oml.ui.listView = function() {
Ox.isArray(key.type) ? key.type[0]: key.type Ox.isArray(key.type) ? key.type[0]: key.type
) > -1 ? 'left' : key.type == 'list' ? 'center' : 'right', ) > -1 ? 'left' : key.type == 'list' ? 'center' : 'right',
defaultWidth: key.columnWidth, defaultWidth: key.columnWidth,
format: key.format, format: function(value) {
return Ox.encodeHTMLEntities(key.format(value));
},
id: key.id, id: key.id,
operator: key.operator, operator: key.operator,
position: position, position: position,