1
0
Fork 0
forked from 0x2620/oxjs

rewrite sanitizeHTML to support global attributes

This commit is contained in:
j 2013-11-10 21:59:36 +00:00
commit fee4339d11
3 changed files with 165 additions and 87 deletions

View file

@ -28,11 +28,11 @@ Ox.Editable = function(options, self) {
editable: true,
editing: false,
format: null,
globalAttributes: [],
height: 0,
highlight: null,
maxHeight: void 0,
placeholder: '',
replaceTags: {},
submitOnBlur: true,
tags: null,
tooltip: '',
@ -230,7 +230,7 @@ Ox.Editable = function(options, self) {
return (
self.options.type == 'input'
? Ox.encodeHTMLEntities(value)
: Ox.sanitizeHTML(value, self.options.tags, self.options.replaceTags)
: Ox.sanitizeHTML(value, self.options.tags, self.options.globalAttributes)
);
}

View file

@ -16,9 +16,9 @@ Ox.EditableContent = function(options, self) {
editable: true,
editing: false,
format: null,
globalAttributes: [],
highlight: null,
placeholder: '',
replaceTags: {},
submitOnBlur: true,
tags: null,
tooltip: '',
@ -190,7 +190,7 @@ Ox.EditableContent = function(options, self) {
return (
self.options.type == 'input'
? Ox.encodeHTMLEntities(value)
: Ox.sanitizeHTML(value, self.options.tags, self.options.replaceTags)
: Ox.sanitizeHTML(value, self.options.tags, self.options.globalAttributes)
);
}