add escape option test
This commit is contained in:
parent
a55f38ab60
commit
88514be8ec
@ -792,6 +792,21 @@ $(function () {
|
|||||||
equal(p.find('select').val(), 3, 'selected value correct');
|
equal(p.find('select').val(), 3, 'selected value correct');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("`escape` option", function () {
|
||||||
|
var e = $('<a href="#" data-type="select"></a>').appendTo('#qunit-fixture').editable({
|
||||||
|
source: [{value: 'a', text: '<b>hello</b>'}],
|
||||||
|
value: 'a',
|
||||||
|
escape: true
|
||||||
|
}),
|
||||||
|
e1 = $('<a href="#" data-type="select"></a>').appendTo('#qunit-fixture').editable({
|
||||||
|
source: [{value: 'a', text: '<b>hello</b>'}],
|
||||||
|
value: 'a',
|
||||||
|
escape: false
|
||||||
|
});
|
||||||
|
|
||||||
|
equal(e.html(), '<b>hello</b>', 'html escaped');
|
||||||
|
equal(e1.html(), '<b>hello</b>', 'html not escaped');
|
||||||
|
});
|
||||||
|
|
||||||
asyncTest("sourceOptions", function () {
|
asyncTest("sourceOptions", function () {
|
||||||
expect(3);
|
expect(3);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user