diff options
author | Brandon Aaron <brandon.aaron@gmail.com> | 2007-04-25 19:48:00 +0000 |
---|---|---|
committer | Brandon Aaron <brandon.aaron@gmail.com> | 2007-04-25 19:48:00 +0000 |
commit | 5fae496933cf4cad5826fbd871d0db455dc2947e (patch) | |
tree | cfc32807f397b0584e3775b3ad363d54e242a5a3 /src | |
parent | 958bed09da67c052dfa85c0bb8c0dc88873e5923 (diff) | |
download | jquery-5fae496933cf4cad5826fbd871d0db455dc2947e.tar.gz jquery-5fae496933cf4cad5826fbd871d0db455dc2947e.zip |
Fix for #1086: Append all caps HTML tags
Diffstat (limited to 'src')
-rw-r--r-- | src/jquery/coreTest.js | 14 | ||||
-rw-r--r-- | src/jquery/jquery.js | 2 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js index 979176708..0592ae926 100644 --- a/src/jquery/coreTest.js +++ b/src/jquery/coreTest.js @@ -405,17 +405,17 @@ test("append(String|Element|Array<Element>|jQuery)", function() { ok( pass, "Test for appending a DOM node to the contents of an IFrame" ); reset(); - $('#select1').appendTo('#foo'); - t( 'Append select', '#foo select', ['select1'] ); - - reset(); $('<fieldset>').appendTo('#form').append('<legend id="legend">test</legend>'); t( 'Append legend', '#legend', ['legend'] ); + reset(); + $('#select1').append('<OPTION>Test</OPTION>'); + ok( $('#select1 option:last').text() == "Test", "Appending <OPTION> (all caps)" ); + }); test("appendTo(String|Element|Array<Element>|jQuery)", function() { - expect(5); + expect(6); var defaultText = 'Try them out:' $('<b>buga</b>').appendTo('#first'); ok( $("#first").text() == defaultText + 'buga', 'Check if text appending works' ); @@ -435,6 +435,10 @@ test("appendTo(String|Element|Array<Element>|jQuery)", function() { expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo"; $("#first, #yahoo").appendTo('#sap'); ok( expected == $('#sap').text(), "Check for appending of jQuery object" ); + + reset(); + $('#select1').appendTo('#foo'); + t( 'Append select', '#foo select', ['select1'] ); }); test("prepend(String|Element|Array<Element>|jQuery)", function() { diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index a2a9b9f79..7b7218540 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -1479,7 +1479,7 @@ jQuery.extend({ // Convert html string into DOM nodes if ( typeof arg == "string" ) { // Trim whitespace, otherwise indexOf won't work as expected - var s = jQuery.trim(arg), div = doc.createElement("div"), tb = []; + var s = jQuery.trim(arg).toLowerCase(), div = doc.createElement("div"), tb = []; var wrap = // option or optgroup |