From 7c4144fab314d98b85303d01ab904bb711bc2ecc Mon Sep 17 00:00:00 2001 From: John Resig Date: Wed, 11 Nov 2009 14:23:56 -0500 Subject: [PATCH] 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. --- src/manipulation.js | 2 +- test/unit/manipulation.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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('
')); -- 1.7.10.4