Index: wp-includes/class.wp-scripts.php
===================================================================
--- wp-includes/class.wp-scripts.php	(revision 17567)
+++ wp-includes/class.wp-scripts.php	(working copy)
@@ -48,34 +48,23 @@
 	}
 
 	function print_scripts_l10n( $handle, $echo = true ) {
-		if ( empty($this->registered[$handle]->extra['l10n']) || empty($this->registered[$handle]->extra['l10n'][0]) || !is_array($this->registered[$handle]->extra['l10n'][1]) )
+		if ( empty($this->registered[$handle]->extra['l10n']) || empty($this->registered[$handle]->extra['l10n'][0]) )
 			return false;
 
 		$object_name = $this->registered[$handle]->extra['l10n'][0];
+		$data = $this->registered[$handle]->extra['l10n'][1];
 
-		$data = "var $object_name = {\n";
-		$eol = '';
-		foreach ( $this->registered[$handle]->extra['l10n'][1] as $var => $val ) {
-			if ( 'l10n_print_after' == $var ) {
-				$after = $val;
-				continue;
-			}
-			$data .= "$eol\t$var: \"" . esc_js( $val ) . '"';
-			$eol = ",\n";
-		}
-		$data .= "\n};\n";
-		$data .= isset($after) ? "$after\n" : '';
+		$output = "var $object_name = " . json_encode($data) . "; $after\n";
 
-		if ( $echo ) {
-			echo "<script type='text/javascript'>\n";
-			echo "/* <![CDATA[ */\n";
-			echo $data;
-			echo "/* ]]> */\n";
-			echo "</script>\n";
-			return true;
-		} else {
-			return $data;
-		}
+		if ( !$echo )
+			return $output;
+
+		echo "<script type='text/javascript'>\n";
+		echo "/* <![CDATA[ */\n";
+		echo $output;
+		echo "/* ]]> */\n";
+		echo "</script>\n";
+		return true;
 	}
 
 	function do_item( $handle, $group = false ) {
Index: wp-includes/script-loader.php
===================================================================
--- wp-includes/script-loader.php	(revision 17567)
+++ wp-includes/script-loader.php	(working copy)
@@ -68,7 +68,6 @@
 	$scripts->add_data( 'common', 'group', 1 );
 	$scripts->localize( 'common', 'commonL10n', array(
 		'warnDelete' => __("You are about to permanently delete the selected items.\n  'Cancel' to stop, 'OK' to delete."),
-		'l10n_print_after' => 'try{convertEntities(commonL10n);}catch(e){};'
 	) );
 
 	$scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", false, '1.6.1' );
@@ -86,7 +85,6 @@
 		'enterURL' => __('Enter the URL'),
 		'enterImageURL' => __('Enter the URL of the image'),
 		'enterImageDescription' => __('Enter a description of the image'),
-		'l10n_print_after' => 'try{convertEntities(quicktagsL10n);}catch(e){};'
 	) );
 
 	$scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' );
@@ -100,7 +98,6 @@
 	$scripts->localize( 'wp-ajax-response', 'wpAjax', array(
 		'noPerm' => __('You do not have permission to do that.'),
 		'broken' => __('An unidentified error has occurred.'),
-		'l10n_print_after' => 'try{convertEntities(wpAjax);}catch(e){};'
 	) );
 
 	$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20110327' );
@@ -193,7 +190,6 @@
 			'of' => __('of'),
 			'close' => __('Close'),
 			'noiframes' => __('This feature requires inline frames. You have iframes disabled or your browser does not support them.'),
-			'l10n_print_after' => 'try{convertEntities(thickboxL10n);}catch(e){};'
 	) );
 
 
@@ -236,7 +232,6 @@
 			'crunching' => __('Crunching&hellip;'),
 			'deleted' => __('moved to the trash.'),
 			'error_uploading' => __('&#8220;%s&#8221; has failed to upload due to an error'),
-			'l10n_print_after' => 'try{convertEntities(swfuploadL10n);}catch(e){};',
 	) );
 
 	$scripts->add( 'comment-reply', "/wp-includes/js/comment-reply$suffix.js", false, '20090102');
@@ -256,7 +251,6 @@
 		'good' => _x('Medium', 'password strength'),
 		'strong' => __('Strong'),
 		'mismatch' => __('Mismatch'),
-		'l10n_print_after' => 'try{convertEntities(pwsL10n);}catch(e){};'
 	) );
 
 	$scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter' ), '20110113' );
@@ -271,7 +265,6 @@
 		'save' => __('Add Link'),
 		'noTitle' => __('(no title)'),
 		'noMatchesFound' => __('No matches found.'),
-		'l10n_print_after' => 'try{convertEntities(wpLinkL10n);}catch(e){};',
 	) );
 
 	$scripts->add( 'wpdialogs-popup', "/wp-includes/js/tinymce/plugins/wpdialogs/js/popup$suffix.js", array( 'jquery-ui-dialog' ), '20101119' );
@@ -282,7 +275,6 @@
 		$scripts->localize( 'ajaxcat', 'catL10n', array(
 			'add' => esc_attr(__('Add')),
 			'how' => __('Separate multiple categories with commas.'),
-			'l10n_print_after' => 'try{convertEntities(catL10n);}catch(e){};'
 		) );
 
 		$scripts->add( 'admin-categories', "/wp-admin/js/categories$suffix.js", array('wp-lists'), '20091201' );
@@ -293,7 +285,6 @@
 		$scripts->localize( 'admin-tags', 'tagsl10n', array(
 			'noPerm' => __('You do not have permission to do that.'),
 			'broken' => __('An unidentified error has occurred.'),
-			'l10n_print_after' => 'try{convertEntities(tagsl10n);}catch(e){};'
 		));
 
 		$scripts->add( 'admin-custom-fields', "/wp-admin/js/custom-fields$suffix.js", array('wp-lists'), '20090106' );
@@ -338,7 +329,6 @@
 			'password' => __('Password Protected'),
 			'privatelyPublished' => __('Privately Published'),
 			'published' => __('Published'),
-			'l10n_print_after' => 'try{convertEntities(postL10n);}catch(e){};'
 		) );
 
 		$scripts->add( 'link', "/wp-admin/js/link$suffix.js", array('wp-lists', 'postbox'), '20090526' );
@@ -350,7 +340,6 @@
 			'cancel' => __('Cancel'),
 			'edit' => __('Edit'),
 			'submittedOn' => __('Submitted on:'),
-			'l10n_print_after' => 'try{convertEntities(commentL10n);}catch(e){};'
 		) );
 
 		$scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ), '20090516' );
@@ -365,7 +354,6 @@
 		$scripts->add_data( 'word-count', 'group', 1 );
 		$scripts->localize( 'word-count', 'wordCountL10n', array(
 			'count' => __('Word count: %d'),
-			'l10n_print_after' => 'try{convertEntities(wordCountL10n);}catch(e){};'
 		));
 
 		$scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'thickbox' ), '20110118' );
@@ -380,14 +368,12 @@
 			'error' => __('Error while saving the changes.'),
 			'ntdeltitle' => __('Remove From Bulk Edit'),
 			'notitle' => __('(no title)'),
-			'l10n_print_after' => 'try{convertEntities(inlineEditL10n);}catch(e){};'
 		) );
 
 		$scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery' ), '20100615' );
 		$scripts->add_data( 'inline-edit-tax', 'group', 1 );
 		$scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array(
 			'error' => __('Error while saving the changes.'),
-			'l10n_print_after' => 'try{convertEntities(inlineEditL10n);}catch(e){};'
 		) );
 
 		$scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'thickbox' ), '20110113' );
@@ -395,7 +381,6 @@
 		$scripts->localize( 'plugin-install', 'plugininstallL10n', array(
 			'plugin_information' => __('Plugin Information:'),
 			'ays' => __('Are you sure you want to install this plugin?'),
-			'l10n_print_after' => 'try{convertEntities(plugininstallL10n);}catch(e){};'
 		) );
 
 		$scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' );
@@ -421,7 +406,6 @@
 			'saving' => __( 'Saving...' ),
 			'error' => __( 'Could not set that as the thumbnail image. Try a different attachment.' ),
 			'done' => __( 'Done' ),
-			'l10n_print_after' => 'try{convertEntities(setPostThumbnailL10n);}catch(e){};'
 		) );
 
 		// Navigation Menus
@@ -430,7 +414,6 @@
 			'noResultsFound' => _x('No results found.', 'search results'),
 			'warnDeleteMenu' => __( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ),
 			'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'),
-			'l10n_print_after' => 'try{convertEntities(navMenuL10n);}catch(e){};'
 		) );
 
 		$scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array('farbtastic'), '20101025' );
@@ -554,7 +537,6 @@
 		'requestFile' => admin_url('admin-ajax.php'),
 		'savingText' => __('Saving Draft&#8230;'),
 		'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'),
-		'l10n_print_after' => 'try{convertEntities(autosaveL10n);}catch(e){};'
 	) );
 
 }
