Index: class.wp-scripts.php
===================================================================
--- class.wp-scripts.php	(revision 10126)
+++ class.wp-scripts.php	(working copy)
@@ -40,29 +40,37 @@
 		if ( empty($this->registered[$handle]->extra['l10n']) || empty($this->registered[$handle]->extra['l10n'][0]) || !is_array($this->registered[$handle]->extra['l10n'][1]) )
 			return false;
 
+		static $printed_once = false;
+
 		$object_name = $this->registered[$handle]->extra['l10n'][0];
 
 		echo "<script type='text/javascript'>\n";
 		echo "/* <![CDATA[ */\n";
-		echo "function convertEntities(o) {\n";
-		echo "	var c = function(s) {\n";
-		echo "		if (/&[^;]+;/.test(s)) {\n";
-		echo "			var e = document.createElement('div');\n";
-		echo "			e.innerHTML = s;\n";
-		echo "			return !e.firstChild ? s : e.firstChild.nodeValue;\n";
-		echo "		}\n";
-		echo "		return s;\n";
-		echo "	}\n";
-		echo "	if ( typeof o === 'string' ) {\n";
-		echo "		return c(o);\n";
-		echo "	} else if ( typeof o === 'object' ) {\n";
-		echo "		for (var v in o) {\n";
-		echo "			if ( typeof o[v] === 'string' )\n";
-		echo "				o[v] = c(o[v]);\n";
-		echo "		}\n";
-		echo "	}\n";
-		echo "	return o;\n";
-		echo "};\n";
+
+		if ( !$printed_once ) {
+			echo "function convertEntities(o) {\n";
+			echo "	var c = function(s) {\n";
+			echo "		if (/&[^;]+;/.test(s)) {\n";
+			echo "			var e = document.createElement('div');\n";
+			echo "			e.innerHTML = s;\n";
+			echo "			return !e.firstChild ? s : e.firstChild.nodeValue;\n";
+			echo "		}\n";
+			echo "		return s;\n";
+			echo "	}\n";
+			echo "	if ( typeof o === 'string' ) {\n";
+			echo "		return c(o);\n";
+			echo "	} else if ( typeof o === 'object' ) {\n";
+			echo "		for (var v in o) {\n";
+			echo "			if ( typeof o[v] === 'string' )\n";
+			echo "				o[v] = c(o[v]);\n";
+			echo "		}\n";
+			echo "	}\n";
+			echo "	return o;\n";
+			echo "};\n";
+
+			$printed_once = true;
+		}
+
 		echo "\t$object_name = {\n";
 		$eol = '';
 		foreach ( $this->registered[$handle]->extra['l10n'][1] as $var => $val ) {
