diff options
Diffstat (limited to 'src/attributes/val.js')
-rw-r--r-- | src/attributes/val.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/attributes/val.js b/src/attributes/val.js index e23aa9a21..fbf406929 100644 --- a/src/attributes/val.js +++ b/src/attributes/val.js @@ -1,13 +1,13 @@ define( [ "../core", + "../core/stripAndCollapse", "./support", "../core/init" -], function( jQuery, support ) { +], function( jQuery, stripAndCollapse, support ) { "use strict"; -var rreturn = /\r/g, - rspaces = /[\x20\t\r\n\f]+/g; +var rreturn = /\r/g; jQuery.fn.extend( { val: function( value ) { @@ -91,7 +91,7 @@ jQuery.extend( { // option.text throws exceptions (#14686, #14858) // Strip and collapse whitespace // https://html.spec.whatwg.org/#strip-and-collapse-whitespace - jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " ); + stripAndCollapse( jQuery.text( elem ) ); } }, select: { |