From: John Resig Date: Wed, 11 Nov 2009 19:23:56 +0000 (-0500) Subject: Fixed the case where HTML that contained entities was being inserted as text strings... X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=commitdiff_plain;h=7c4144fab314d98b85303d01ab904bb711bc2ecc Fixed the case where HTML that contained entities was being inserted as text strings instead of HTML. Thanks to dmethvin for the test case! Fixes #5483. --- diff --git a/src/manipulation.js b/src/manipulation.js index eea377b..1699f68 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -4,7 +4,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, rselfClosing = /^(?:abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i, rtagName = /<([\w:]+)/, rtbody = /'), insert = "<div>hello1</div>"; + equals( $div2.html(insert).html(), insert, "Verify escaped insertion." ); + equals( $div2.html("x" + insert).html(), "x" + insert, "Verify escaped insertion." ); + equals( $div2.html(" " + insert).html(), " " + insert, "Verify escaped insertion." ); + + reset(); jQuery("#main").html(valueObj('
'));