Index: wp-admin/gears-manifest.php
===================================================================
--- wp-admin/gears-manifest.php	(revision 8288)
+++ wp-admin/gears-manifest.php	(working copy)
@@ -145,7 +145,7 @@
 { "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=311" },
 { "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=311" },
 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=311" },
-{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311" },
+{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311b" },
 { "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=311" },
 
 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=311" },
@@ -158,7 +158,7 @@
 { "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=311" },
 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=311" },
 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=311" },
-{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311" },
+{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311b" },
 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=311" },
 { "url" : "../wp-includes/js/tinymce/wordpress.css?ver=311" },
 
Index: wp-content/themes/classic/style.css
===================================================================
--- wp-content/themes/classic/style.css	(revision 8288)
+++ wp-content/themes/classic/style.css	(working copy)
@@ -322,7 +322,7 @@
 
 /* Captions & aligment */
 .aligncenter,
-dl.aligncenter {
+div.aligncenter {
 	display: block;
 	margin-left: auto;
 	margin-right: auto;
@@ -336,7 +336,7 @@
 	float: right;
 }
 
-.wp_caption {
+.wp-caption {
 	border: 1px solid #ddd;
 	text-align: center;
 	background-color: #f3f3f3;
@@ -348,13 +348,13 @@
 	border-radius: 3px;
 }
 
-.wp_caption img {
+.wp-caption img {
 	margin: 0;
 	padding: 0;
 	border: 0 none;
 }
 
-.wp_caption_dd {
+.wp-caption p.wp-caption-text {
 	font-size: 11px;
 	line-height: 17px;
 	padding: 0 4px 5px;
Index: wp-content/themes/default/style.css
===================================================================
--- wp-content/themes/default/style.css	(revision 8288)
+++ wp-content/themes/default/style.css	(working copy)
@@ -640,13 +640,13 @@
 
 /* Captions */
 .aligncenter,
-dl.aligncenter {
+div.aligncenter {
 	display: block;
 	margin-left: auto;
 	margin-right: auto;
 }
 
-.wp_caption {
+.wp-caption {
 	border: 1px solid #ddd;
 	text-align: center;
 	background-color: #f3f3f3;
@@ -658,13 +658,13 @@
 	border-radius: 3px;
 }
 
-.wp_caption img {
+.wp-caption img {
 	margin: 0;
 	padding: 0;
 	border: 0 none;
 }
 
-.wp_caption_dd {
+.wp-caption p.wp-caption-text {
 	font-size: 11px;
 	line-height: 17px;
 	padding: 0 4px 5px;
Index: wp-includes/formatting.php
===================================================================
--- wp-includes/formatting.php	(revision 8288)
+++ wp-includes/formatting.php	(working copy)
@@ -1124,18 +1124,10 @@
 	// Filtering a blank results in an annoying <br />\n
 	if ( empty($text) ) return apply_filters('richedit_pre', '');
 
-	$output = $text;
-	$output = convert_chars($output);
+	$output = convert_chars($text);
 	$output = wpautop($output);
+	$output = htmlspecialchars($output, ENT_NOQUOTES);
 
-	// These must be double-escaped or planets will collide.
-	$output = str_replace('&lt;', '&amp;lt;', $output);
-	$output = str_replace('&gt;', '&amp;gt;', $output);
-
-	// These should be entities too
-	$output = str_replace('<', '&lt;', $output);
-	$output = str_replace('>', '&gt;', $output);
-	
 	return apply_filters('richedit_pre', $output);
 }
 
Index: wp-includes/js/tinymce/langs/wp-langs.php
===================================================================
--- wp-includes/js/tinymce/langs/wp-langs.php	(revision 8288)
+++ wp-includes/js/tinymce/langs/wp-langs.php	(working copy)
@@ -434,7 +434,8 @@
 s110:"' . mce_escape( __('110%') ) . '",
 s120:"' . mce_escape( __('120%') ) . '",
 s130:"' . mce_escape( __('130%') ) . '",
-caption:"' . mce_escape( __('Caption') ) . '"
+img_title:"' . mce_escape( __('Edit Image Title') ) . '",
+caption:"' . mce_escape( __('Edit Image Caption') ) . '"
 });
 ';
 ?>
\ No newline at end of file
Index: wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css
===================================================================
--- wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css	(revision 8288)
+++ wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css	(working copy)
@@ -62,6 +62,10 @@
 	width: 107px;
 }
 
+#media-upload #basic th.label {
+	padding: 5px 5px 5px 0;
+}
+
 .show-align {
 	height: 200px;
 	width: 480px;
Index: wp-includes/js/tinymce/plugins/wpeditimage/editimage.html
===================================================================
--- wp-includes/js/tinymce/plugins/wpeditimage/editimage.html	(revision 8288)
+++ wp-includes/js/tinymce/plugins/wpeditimage/editimage.html	(working copy)
@@ -7,7 +7,7 @@
 <script type="text/javascript" src="js/editimage.js?ver=311"></script>
 <script type="text/javascript" src="../../utils/form_utils.js?ver=311"></script>
 
-<link rel="stylesheet" href="css/editimage.css?ver=311" type="text/css" media="all" />
+<link rel="stylesheet" href="css/editimage.css?ver=311b" type="text/css" media="all" />
 <link rel="stylesheet" href="../../../../../wp-admin/css/media.css?ver=2.6-beta1" type="text/css" media="all" />
 <script type="text/javascript">
 if ( 'rtl' == tinyMCEPopup.editor.getParam('directionality','') )
@@ -77,8 +77,7 @@
 		<tr class="">
 			<th valign="top" scope="row" class="label">
 				<label for="img_title">
-				<span class="alignleft">{#advanced_dlg.link_titlefield}</span>
-				<span class="alignright"><abbr title="required" class="required">*</abbr></span>
+				<span class="alignleft">{#wpeditimage.img_title}</span>
 				</label>
 			</th>
 			<td class="field">
Index: wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js
===================================================================
--- wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js	(revision 8288)
+++ wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js	(working copy)
@@ -15,7 +15,7 @@
 				if ( ed.dom.getAttrib(el, 'class').indexOf('mceItem') != -1 || el.nodeName != 'IMG' )
 					return;
 
-				tb_show('', url + '/editimage.html?TB_iframe=true');
+				tb_show('', url + '/editimage.html?ver=311b&TB_iframe=true');
 				tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
 			});
 
@@ -74,6 +74,8 @@
 
 		_do_shcode : function(co) {
 			return co.replace(/\[wp_caption([^\]]+)\]([\s\S]+?)\[\/wp_caption\][\s\u00a0]*/g, function(a,b,c){
+				b = b.replace(/\\'|\\&#39;|\\&#039;/g, '&#39;').replace(/\\"|\\&quot;/g, '&quot;');
+				c = c.replace(/\\&#39;|\\&#039;/g, '&#39;').replace(/\\&quot;/g, '&quot;');
 				var id = b.match(/id=['"]([^'"]+)/i), cls = b.match(/align=['"]([^'"]+)/i);
 				var w = b.match(/width=['"]([0-9]+)/), cap = b.match(/caption=['"]([^'"]+)/i);
 
@@ -91,7 +93,7 @@
 		},
 
 		_get_shcode : function(co) {
-			return co.replace(/<div class="mceTemp[^"]*">\s*<dl([^>]+)>\s*<dt[^>]+>([\s\S]+?)<\/dt>\s*<dd[^>]+>([^<]+)<\/dd>\s*<\/dl>\s*<\/div>\s*/gi, function(a,b,c,cap){
+			return co.replace(/<div class="mceTemp[^"]*">\s*<dl([^>]+)>\s*<dt[^>]+>([\s\S]+?)<\/dt>\s*<dd[^>]+>(.+?)<\/dd>\s*<\/dl>\s*<\/div>\s*/gi, function(a,b,c,cap){
 				var id = b.match(/id=['"]([^'"]+)/i), cls = b.match(/class=['"]([^'"]+)/i);
 				var w = c.match(/width=['"]([0-9]+)/);
 
@@ -101,6 +103,7 @@
 
 				if ( ! w || ! cap ) return c;
 				cls = cls.match(/align[^ '"]+/) || 'alignnone';
+				cap = cap.replace(/<\S[^<>]*>/gi, '').replace(/'/g, '&#39;').replace(/"/g, '&quot;');
 
 				return '[wp_caption id="'+id+'" align="'+cls+'" width="'+w+'" caption="'+cap+'"]'+c+'[/wp_caption]';
 			});
Index: wp-includes/js/tinymce/tiny_mce_config.php
===================================================================
--- wp-includes/js/tinymce/tiny_mce_config.php	(revision 8288)
+++ wp-includes/js/tinymce/tiny_mce_config.php	(working copy)
@@ -222,7 +222,7 @@
 // Setup cache info
 if ( $disk_cache ) {
 
-	$cacheKey = apply_filters('tiny_mce_version', '20080706');
+	$cacheKey = apply_filters('tiny_mce_version', '20080708');
 
 	foreach ( $initArray as $v )
 		$cacheKey .= $v;
Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 8288)
+++ wp-includes/media.php	(working copy)
@@ -350,12 +350,12 @@
 	return $html;
 }
 
-add_shortcode('wp_caption', 'wp_caption_shortcode');
+add_shortcode('wp_caption', 'img_caption_shortcode');
 
-function wp_caption_shortcode($attr, $content = null) {
+function img_caption_shortcode($attr, $content = null) {
 	
 	// Allow plugins/themes to override the default caption template.
-	$output = apply_filters('wp_caption_shortcode', '', $attr, $content);
+	$output = apply_filters('img_caption_shortcode', '', $attr, $content);
 	if ( $output != '' )
 		return $output;
 
@@ -371,8 +371,8 @@
 	
 	if ( $id ) $id = 'id="' . $id . '" ';
 	
-	return '<dl ' . $id . 'class="wp_caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px">'
-	. '<dt class="wp_caption_dt">' . $content . '</dt><dd class="wp_caption_dd">' . $caption . '</dd></dl>';
+	return '<div ' . $id . 'class="wp-caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px">'
+	. $content . '<p class="wp-caption-text">' . $caption . '</p></div>';
 }
 
 add_shortcode('gallery', 'gallery_shortcode');
Index: wp-includes/script-loader.php
===================================================================
--- wp-includes/script-loader.php	(revision 8288)
+++ wp-includes/script-loader.php	(working copy)
@@ -37,7 +37,7 @@
 	$scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080706' );
 
 	// Modify this version when tinyMCE plugins are changed.
-	$mce_version = apply_filters('tiny_mce_version', '20080706');
+	$mce_version = apply_filters('tiny_mce_version', '20080708');
 	$scripts->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version );
 
 	$scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');
