1
0
Fork 0
forked from 0x2620/oxjs

properly escape user names and list names

This commit is contained in:
rlx 2012-02-22 10:14:25 +00:00
commit 68ca199ae3
6 changed files with 18 additions and 6 deletions

View file

@ -206,7 +206,12 @@ Ox.AnnotationFolder = function(options, self) {
separator: ';',
sort: self.sort,
submitOnBlur: false,
tooltipText: self.options.showInfo ? '<b>{user}</b>, {date}' : '',
tooltipText: self.options.showInfo ? function(item) {
return Ox.formatString('<b>{user}</b> {date}', {
user: Ox.encodeHTMLEntities(item.user),
date: item.date
});
} : '',
width: self.options.width,
maxHeight: self.options.type == 'text' ? Infinity : void 0,
type: self.options.type == 'text' ? 'textarea' : 'input'

View file

@ -340,7 +340,7 @@ Ox.AnnotationPanel = function(options, self) {
{},
{id: 'users', title: 'Show Users', disabled: true},
{group: 'users', min: 1, max: -1, items: self.users.map(function(user) {
return {id: user, title: user, checked:
return {id: user, title: Ox.encodeHTMLEntities(user), checked:
self.enabledUsers == 'all' || self.enabledUsers.indexOf(user) > -1
};
})}