mirror of
https://github.com/jquery/jquery.git
synced 2026-02-04 14:05:08 -05:00
Fix #12350. Remove BOM in jQuery.trim. Close gh-897.
This commit is contained in:
committed by
Dave Methvin
parent
0fea007a1a
commit
2b5b4ebbd7
@@ -264,7 +264,7 @@ test("noConflict", function() {
|
||||
});
|
||||
|
||||
test("trim", function() {
|
||||
expect(9);
|
||||
expect(13);
|
||||
|
||||
var nbsp = String.fromCharCode(160);
|
||||
|
||||
@@ -278,6 +278,11 @@ test("trim", function() {
|
||||
equal( jQuery.trim( null ), "", "Null" );
|
||||
equal( jQuery.trim( 5 ), "5", "Number" );
|
||||
equal( jQuery.trim( false ), "false", "Boolean" );
|
||||
|
||||
equal( jQuery.trim(" "), "", "space should be trimmed" );
|
||||
equal( jQuery.trim("ipad\xA0"), "ipad", "nbsp should be trimmed" );
|
||||
equal( jQuery.trim("\uFEFF"), "", "zwsp should be trimmed" );
|
||||
equal( jQuery.trim("\uFEFF \xA0! | \uFEFF"), "! |", "leading/trailing should be trimmed" );
|
||||
});
|
||||
|
||||
test("type", function() {
|
||||
|
||||
Reference in New Issue
Block a user