add option escape, fixes

This commit is contained in:
vitalets
2013-09-22 01:05:42 +04:00
parent fff300e2bd
commit 1329e0ccf9
11 changed files with 38 additions and 19 deletions

@ -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,