Index: editor_plugin.dev.js
===================================================================
--- editor_plugin.dev.js	(revision 19932)
+++ editor_plugin.dev.js	(working copy)
@@ -134,12 +134,13 @@
 				id = b.match(/id=['"]([^'"]+)/i);
 				cls = b.match(/align=['"]([^'"]+)/i);
 				w = b.match(/width=['"]([0-9]+)/);
-				cap = b.match(/caption=['"]([^'"]+)/i);
+				cap = b.match(/caption=["]([^"]+)/i);
 
 				id = ( id && id[1] ) ? id[1] : '';
 				cls = ( cls && cls[1] ) ? cls[1] : 'alignnone';
 				w = ( w && w[1] ) ? w[1] : '';
 				cap = ( cap && cap[1] ) ? cap[1] : '';
+				cap = cap.replace(/&#39;|\\&#039;/g, "'");
 				if ( ! w || ! cap ) return c;
 				
 				div_cls = (cls == 'aligncenter') ? 'mceTemp mceIEcenter' : 'mceTemp';
@@ -163,8 +164,9 @@
 
 				if ( ! w || ! cap ) return c;
 				cls = cls.match(/align[^ '"]+/) || 'alignnone';
-				cap = cap.replace(/<\S[^<>]*>/gi, '').replace(/'/g, '&#39;').replace(/"/g, '&quot;');
 
+				cap = cap.replace(/<[^a|\/a]\S[^<>]*>/gi, '').replace(/["]/g, "'");
+
 				return '[caption id="'+id+'" align="'+cls+'" width="'+w+'" caption="'+cap+'"]'+c+'[/caption]';
 			});
 		},
@@ -230,4 +232,4 @@
 	});
 
 	tinymce.PluginManager.add('wpeditimage', tinymce.plugins.wpEditImage);
-})();
+})();
\ No newline at end of file
