From dec2804c783003c13d356ed3fec664c3ac4b05ee Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Fri, 17 Feb 2012 14:17:20 -0500 Subject: Fix #11359: preserve contents for cloned scripts --- src/manipulation.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/manipulation.js b/src/manipulation.js index 602076a1b..220e09d46 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -456,6 +456,10 @@ function cloneFixAttributes( src, dest ) { // cloning other types of input fields } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; + + // IE blanks contents when cloning scripts + } else if ( nodeName === "script" && dest.text !== src.text ) { + dest.text = src.text; } // Event data gets referenced instead of copied if the expando -- cgit v1.2.3