Make sure that XHTML-style HTML is purified in .html(). Fixes #5845.
This commit is contained in:
parent
f06e0e5575
commit
6a3d0996ed
2 changed files with 10 additions and 3 deletions
|
@ -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 );
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue