File tree 5 files changed +18
-13
lines changed
5 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 1
1
.DS_Store
2
- * .log
3
-
4
- # WebDAV file system cache
5
- .DAV /
2
+ .DAV
3
+ node_modules
4
+ bower_components
5
+ * .log
Original file line number Diff line number Diff line change 2534
2534
if ( ! value . length ) return ;
2535
2535
2536
2536
settings_element . options [ value ] = readData ( $option ) || {
2537
- 'text' : $option . text ( ) , //don't use .html() as it escapes - we leave that to the render
2537
+ 'text' : $option . text ( ) ,
2538
2538
'value' : value ,
2539
2539
'optgroup' : group
2540
2540
} ;
2575
2575
var $input = $ ( this ) ;
2576
2576
var tag_name = $input [ 0 ] . tagName . toLowerCase ( ) ;
2577
2577
var settings_element = {
2578
- 'placeholder' : $input . attr ( 'placeholder' ) ,
2578
+ 'placeholder' : $input . children ( 'option[value=""]' ) . text ( ) || $input . attr ( 'placeholder' ) ,
2579
2579
'options' : { } ,
2580
2580
'optgroups' : { } ,
2581
2581
'items' : [ ]
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ $.fn.selectize = function(settings) {
51
51
if ( ! value . length ) return ;
52
52
53
53
settings_element . options [ value ] = readData ( $option ) || {
54
- 'text' : $option . text ( ) , //don't use .html() as it escapes - we leave that to the render
54
+ 'text' : $option . text ( ) ,
55
55
'value' : value ,
56
56
'optgroup' : group
57
57
} ;
@@ -92,7 +92,7 @@ $.fn.selectize = function(settings) {
92
92
var $input = $ ( this ) ;
93
93
var tag_name = $input [ 0 ] . tagName . toLowerCase ( ) ;
94
94
var settings_element = {
95
- 'placeholder' : $input . attr ( 'placeholder' ) ,
95
+ 'placeholder' : $input . children ( 'option[value=""]' ) . text ( ) || $input . attr ( 'placeholder' ) ,
96
96
'options' : { } ,
97
97
'optgroups' : { } ,
98
98
'items' : [ ]
Original file line number Diff line number Diff line change 27
27
} ) ;
28
28
29
29
describe ( '<select>' , function ( ) {
30
- it ( 'complete without exceptions' , function ( ) {
30
+ it ( 'should complete without exceptions' , function ( ) {
31
31
test = setup_test ( '<select>' , { } ) ;
32
32
test . teardown ( ) ;
33
33
} ) ;
34
+ it ( 'should add options in text form (no html entities)' , function ( ) {
35
+ test = setup_test ( '<select><option selected value="a"><hi></option></select>' , { } ) ;
36
+ expect ( test . selectize . options [ 'a' ] . text ) . to . be . equal ( '<hi>' ) ;
37
+ test . teardown ( ) ;
38
+ } ) ;
34
39
describe ( 'getValue()' , function ( ) {
35
40
it ( 'should return "" when empty' , function ( ) {
36
41
test = setup_test ( '<select>' , { } ) ;
46
51
} ) ;
47
52
48
53
describe ( '<select multiple>' , function ( ) {
49
- it ( 'complete without exceptions' , function ( ) {
54
+ it ( 'should complete without exceptions' , function ( ) {
50
55
test = setup_test ( '<select>' , { } ) ;
51
56
test . teardown ( ) ;
52
57
} ) ;
You can’t perform that action at this time.
0 commit comments