diff --git a/test/unit/select.js b/test/unit/select.js index f145ad5..ee96018 100644 --- a/test/unit/select.js +++ b/test/unit/select.js @@ -792,6 +792,21 @@ $(function () { 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 () { expect(3);