mirror of
https://github.com/jquery/jquery.git
synced 2024-10-05 11:34:18 +00:00
Core: revert addition of createHTMLDocument. Thanks, Safari 8.
- Safari 8 has issues when the HTML string contains forms. Closing tags are not respected.
This commit is contained in:
parent
4ab743188e
commit
b77983173e
@ -17,9 +17,7 @@ jQuery.parseHTML = function( data, context, keepScripts ) {
|
||||
keepScripts = context;
|
||||
context = false;
|
||||
}
|
||||
// document.implementation stops scripts or inline event handlers from
|
||||
// being executed immediately
|
||||
context = context || document.implementation.createHTMLDocument( "" );
|
||||
context = context || document;
|
||||
|
||||
var parsed = rsingleTag.exec( data ),
|
||||
scripts = !keepScripts && [];
|
||||
|
@ -1370,20 +1370,6 @@ test("jQuery.parseHTML", function() {
|
||||
ok( jQuery.parseHTML("<#if><tr><p>This is a test.</p></tr><#/if>") || true, "Garbage input should not cause error" );
|
||||
});
|
||||
|
||||
asyncTest("jQuery.parseHTML", function() {
|
||||
expect ( 1 );
|
||||
|
||||
Globals.register("parseHTMLError");
|
||||
|
||||
jQuery.globalEval("parseHTMLError = false;");
|
||||
jQuery.parseHTML( "<img src=x onerror='parseHTMLError = true'>" );
|
||||
|
||||
window.setTimeout(function() {
|
||||
start();
|
||||
equal( window.parseHTMLError, false, "onerror eventhandler has not been called." );
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
test("jQuery.parseJSON", function() {
|
||||
expect( 20 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user