diff options
author | John Resig <jeresig@gmail.com> | 2010-01-24 21:37:05 -0500 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2010-01-24 21:37:05 -0500 |
commit | 6a3d0996edf2f8ba69f62c8c7c3eda07b674d81f (patch) | |
tree | c16a10fa87b3faf9e7048cce6fcd86b51ab31e9a /src/manipulation.js | |
parent | f06e0e5575bc8f82d0fcbd5880bb9d8ccf361bfa (diff) | |
download | jquery-6a3d0996edf2f8ba69f62c8c7c3eda07b674d81f.tar.gz jquery-6a3d0996edf2f8ba69f62c8c7c3eda07b674d81f.zip |
Make sure that XHTML-style HTML is purified in .html(). Fixes #5845.
Diffstat (limited to 'src/manipulation.js')
-rw-r--r-- | src/manipulation.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index 401cf86bd..23463d16e 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -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 ); } } -});
\ No newline at end of file +}); |