add option escape
, fixes #377
This commit is contained in:
CHANGELOG.txt
src/inputs
test/unit
@ -52,7 +52,7 @@ To create your own input you can inherit from this class.
|
||||
@param {DOMElement} element
|
||||
**/
|
||||
value2html: function(value, element) {
|
||||
$(element).text($.trim(value));
|
||||
$(element)[this.options.escape ? 'text' : 'html']($.trim(value));
|
||||
},
|
||||
|
||||
/**
|
||||
@ -194,6 +194,19 @@ To create your own input you can inherit from this class.
|
||||
@default null
|
||||
**/
|
||||
inputclass: null,
|
||||
|
||||
/**
|
||||
If `true` - html will be escaped in content of element via $.text() method.
|
||||
If `false` - html will not be escaped, $.html() used.
|
||||
When you use own `display` function, this option has no influence.
|
||||
|
||||
@property escape
|
||||
@type boolean
|
||||
@since 1.5.0
|
||||
@default true
|
||||
**/
|
||||
escape: true,
|
||||
|
||||
//scope for external methods (e.g. source defined as function)
|
||||
//for internal use only
|
||||
scope: null,
|
||||
|
Reference in New Issue
Block a user