mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 20:55:01 -05:00
Attributes: Trim whitespace from option text when returned as a value
Fixes #14858 Ref #14686 Closes gh-1531
This commit is contained in:
@@ -74,7 +74,9 @@ jQuery.extend({
|
||||
var val = jQuery.find.attr( elem, "value" );
|
||||
return val != null ?
|
||||
val :
|
||||
jQuery.text( elem );
|
||||
// Support: IE10-11+
|
||||
// option.text throws exceptions (#14686, #14858)
|
||||
jQuery.trim( jQuery.text( elem ) );
|
||||
}
|
||||
},
|
||||
select: {
|
||||
|
||||
Reference in New Issue
Block a user