mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Make sure that XHTML-style HTML is purified in .html(). Fixes #5845.
This commit is contained in:
@@ -189,6 +189,8 @@ jQuery.fn.extend({
|
||||
(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
|
||||
!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
|
||||
|
||||
value = value.replace(rxhtmlTag, fcloseTag);
|
||||
|
||||
try {
|
||||
for ( var i = 0, l = this.length; i < l; i++ ) {
|
||||
// Remove element nodes and prevent memory leaks
|
||||
@@ -501,4 +503,4 @@ jQuery.extend({
|
||||
jQuery.removeData( elem );
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user