<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[19316] trunk: Make switchEditors.go() fully back-compat, see #17144</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/19316">19316</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2011-11-17 02:44:28 +0000 (Thu, 17 Nov 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Make switchEditors.go() fully back-compat, see <a href="http://core.trac.wordpress.org/ticket/17144">#17144</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminjseditordevjs">trunk/wp-admin/js/editor.dev.js</a></li>
<li><a href="#trunkwpadminjseditorjs">trunk/wp-admin/js/editor.js</a></li>
<li><a href="#trunkwpadminjswpfullscreendevjs">trunk/wp-admin/js/wp-fullscreen.dev.js</a></li>
<li><a href="#trunkwpadminjswpfullscreenjs">trunk/wp-admin/js/wp-fullscreen.js</a></li>
<li><a href="#trunkwpincludesclasswpeditorphp">trunk/wp-includes/class-wp-editor.php</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminjseditordevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/editor.dev.js (19315 => 19316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/editor.dev.js        2011-11-16 22:55:59 UTC (rev 19315)
+++ trunk/wp-admin/js/editor.dev.js        2011-11-17 02:44:28 UTC (rev 19316)
</span><span class="lines">@@ -1,10 +1,28 @@
</span><span class="cx"> 
</span><span class="cx"> var switchEditors = {
</span><span class="cx"> 
</span><del>-        go: function(a) {
-                var t = this, aid = a.id, l = aid.length, id = aid.substr(0, l - 5), mode = aid.substr(l - 4),
-                        ed = tinyMCE.get(id), wrap_id = 'wp-'+id+'-wrap', dom = tinymce.DOM, txtarea_el = dom.get(id);
</del><ins>+        switchto: function(el) {
+                var aid = el.id, l = aid.length, id = aid.substr(0, l - 5), mode = aid.substr(l - 4);
+                
+                this.go(id, mode);
+        },
+        
+        go: function(id, mode) { // mode can be 'html', 'tmce', or 'toggle'
+                id = id || 'content';
+                mode = mode || 'toggle';
+                
+                var t = this, ed = tinyMCE.get(id), wrap_id, txtarea_el, dom = tinymce.DOM;
</ins><span class="cx"> 
</span><ins>+                wrap_id = 'wp-'+id+'-wrap';
+                txtarea_el = dom.get(id);
+
+                if ( 'toggle' == mode ) {
+                        if ( ed &amp;&amp; !ed.isHidden() )
+                                mode = 'html';
+                        else
+                                mode = 'tmce';
+                } 
+
</ins><span class="cx">                 if ( 'tmce' == mode ) {
</span><span class="cx">                         if ( ed &amp;&amp; ! ed.isHidden() )
</span><span class="cx">                                 return false;
</span></span></pre></div>
<a id="trunkwpadminjseditorjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/editor.js (19315 => 19316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/editor.js        2011-11-16 22:55:59 UTC (rev 19315)
+++ trunk/wp-admin/js/editor.js        2011-11-17 02:44:28 UTC (rev 19316)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var switchEditors={go:function(j){var k=this,d=j.id,e=d.length,b=d.substr(0,e-5),g=d.substr(e-4),h=tinyMCE.get(b),i=&quot;wp-&quot;+b+&quot;-wrap&quot;,f=tinymce.DOM,c=f.get(b);if(&quot;tmce&quot;==g){if(h&amp;&amp;!h.isHidden()){return false}if(typeof(QTags)!=&quot;undefined&quot;){QTags.closeAllTags(b)}if(tinyMCEPreInit.mceInit[b]&amp;&amp;tinyMCEPreInit.mceInit[b].wpautop){c.value=k.wpautop(c.value)}if(h){h.show()}else{h=new tinymce.Editor(b,tinyMCEPreInit.mceInit[b]);h.render()}f.removeClass(i,&quot;html-active&quot;);f.addClass(i,&quot;tmce-active&quot;);setUserSetting(&quot;editor&quot;,&quot;tinymce&quot;)}else{if(&quot;html&quot;==g){if(h&amp;&amp;h.isHidden()){return false}if(h){c.style.height=h.getContentAreaContainer().offsetHeight+20+&quot;px&quot;;h.hide()}f.removeClass(i,&quot;tmce-active&quot;);f.addClass(i,&quot;html-active&quot;);setUserSetting(&quot;editor&quot;,&quot;html&quot;)}}return false},_wp_Nop:function(b){var c,a;if(b.indexOf(&quot;&lt;
 pre&quot;)!=-1||b.indexOf(&quot;&lt;script&quot;)!=-1){b=b.replace(/&lt;(pre|script)[^&gt;]*&gt;[\s\S]+?&lt;\/\1&gt;/g,function(d){d=d.replace(/&lt;br ?\/?&gt;(\r\n|\n)?/g,&quot;&lt;wp_temp&gt;&quot;);return d.replace(/&lt;\/?p( [^&gt;]*)?&gt;(\r\n|\n)?/g,&quot;&lt;wp_temp&gt;&quot;)})}c=&quot;blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|div|h[1-6]|p|fieldset&quot;;b=b.replace(new RegExp(&quot;\\s*&lt;/(&quot;+c+&quot;)&gt;\\s*&quot;,&quot;g&quot;),&quot;&lt;/$1&gt;\n&quot;);b=b.replace(new RegExp(&quot;\\s*&lt;((?:&quot;+c+&quot;)(?: [^&gt;]*)?)&gt;&quot;,&quot;g&quot;),&quot;\n&lt;$1&gt;&quot;);b=b.replace(/(&lt;p [^&gt;]+&gt;.*?)&lt;\/p&gt;/g,&quot;$1&lt;/p#&gt;&quot;);b=b.replace(/&lt;div( [^&gt;]*)?&gt;\s*&lt;p&gt;/gi,&quot;&lt;div$1&gt;\n\n&quot;);b=b.replace(/\s*&lt;p&gt;/gi,&quot;&quot;);b=b.replace(/\s*&lt;\/p&gt;\s*/gi,&quot;\n\n&quot;);b=b.replace(/\n[\s\u00a0]+\n/g,&quot;\n\n&quot;);b=b.replace(/\s*&lt;br ?\/?&gt;\s*/gi,&quot;\n&quot;);b=b.replace(/\s*&lt
 ;div/g,&quot;\n&lt;div&quot;);b=b.replace(/&lt;\/div&gt;\s*/g,&quot;&lt;/div&gt;\n&quot;);b=b.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,&quot;\n\n[caption$1[/caption]\n\n&quot;);b=b.replace(/caption\]\n\n+\[caption/g,&quot;caption]\n\n[caption&quot;);a=&quot;blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|h[1-6]|pre|fieldset&quot;;b=b.replace(new RegExp(&quot;\\s*&lt;((?:&quot;+a+&quot;)(?: [^&gt;]*)?)\\s*&gt;&quot;,&quot;g&quot;),&quot;\n&lt;$1&gt;&quot;);b=b.replace(new RegExp(&quot;\\s*&lt;/(&quot;+a+&quot;)&gt;\\s*&quot;,&quot;g&quot;),&quot;&lt;/$1&gt;\n&quot;);b=b.replace(/&lt;li([^&gt;]*)&gt;/g,&quot;\t&lt;li$1&gt;&quot;);if(b.indexOf(&quot;&lt;hr&quot;)!=-1){b=b.replace(/\s*&lt;hr( [^&gt;]*)?&gt;\s*/g,&quot;\n\n&lt;hr$1&gt;\n\n&quot;)}if(b.indexOf(&quot;&lt;object&quot;)!=-1){b=b.replace(/&lt;object[\s\S]+?&lt;\/object&gt;/g,function(d){return d.replace(/[\r\n]+/g,&quot;&quot;)})}b=b.replace(/&lt;\/p#&gt;/g,&quot;&lt;/p&gt;\n&quot;);b=b.replace(/\s*(&lt;p
  [^&gt;]+&gt;[\s\S]*?&lt;\/p&gt;)/g,&quot;\n$1&quot;);b=b.replace(/^\s+/,&quot;&quot;);b=b.replace(/[\s\u00a0]+$/,&quot;&quot;);b=b.replace(/&lt;wp_temp&gt;/g,&quot;\n&quot;);return b},_wp_Autop:function(a){var b=&quot;table|thead|tfoot|tbody|tr|td|th|caption|col|colgroup|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]|fieldset|legend|hr|noscript|menu|samp|header|footer|article|section|hgroup|nav|aside|details|summary&quot;;if(a.indexOf(&quot;&lt;object&quot;)!=-1){a=a.replace(/&lt;object[\s\S]+?&lt;\/object&gt;/g,function(c){return c.replace(/[\r\n]+/g,&quot;&quot;)})}a=a.replace(/&lt;[^&lt;&gt;]+&gt;/g,function(c){return c.replace(/[\r\n]+/g,&quot; &quot;)});if(a.indexOf(&quot;&lt;pre&quot;)!=-1||a.indexOf(&quot;&lt;script&quot;)!=-1){a=a.replace(/&lt;(pre|script)[^&gt;]*&gt;[\s\S]+?&lt;\/\1&gt;/g,function(c){return c.replace(/(\r\n|\n)/g,&quot;&lt;wp_temp_br&gt;&quot;)})}a=a+&quot;\n\n&quot;;a=a.replace(/&lt;br \/&gt;\s*&lt;br \/&gt;/gi,&quot;\n\n&q
 uot;);a=a.replace(new RegExp(&quot;(&lt;(?:&quot;+b+&quot;)(?: [^&gt;]*)?&gt;)&quot;,&quot;gi&quot;),&quot;\n$1&quot;);a=a.replace(new RegExp(&quot;(&lt;/(?:&quot;+b+&quot;)&gt;)&quot;,&quot;gi&quot;),&quot;$1\n\n&quot;);a=a.replace(/&lt;hr( [^&gt;]*)?&gt;/gi,&quot;&lt;hr$1&gt;\n\n&quot;);a=a.replace(/\r\n|\r/g,&quot;\n&quot;);a=a.replace(/\n\s*\n+/g,&quot;\n\n&quot;);a=a.replace(/([\s\S]+?)\n\n/g,&quot;&lt;p&gt;$1&lt;/p&gt;\n&quot;);a=a.replace(/&lt;p&gt;\s*?&lt;\/p&gt;/gi,&quot;&quot;);a=a.replace(new RegExp(&quot;&lt;p&gt;\\s*(&lt;/?(?:&quot;+b+&quot;)(?: [^&gt;]*)?&gt;)\\s*&lt;/p&gt;&quot;,&quot;gi&quot;),&quot;$1&quot;);a=a.replace(/&lt;p&gt;(&lt;li.+?)&lt;\/p&gt;/gi,&quot;$1&quot;);a=a.replace(/&lt;p&gt;\s*&lt;blockquote([^&gt;]*)&gt;/gi,&quot;&lt;blockquote$1&gt;&lt;p&gt;&quot;);a=a.replace(/&lt;\/blockquote&gt;\s*&lt;\/p&gt;/gi,&quot;&lt;/p&gt;&lt;/blockquote&gt;&quot;);a=a.replace(new RegExp(&quot;&lt;p&gt;\\s*(&lt;/?(?:&quot;+b+&quot;)(?: [^&gt;]*)?&gt;)&quot;,&quo
 t;gi&quot;),&quot;$1&quot;);a=a.replace(new RegExp(&quot;(&lt;/?(?:&quot;+b+&quot;)(?: [^&gt;]*)?&gt;)\\s*&lt;/p&gt;&quot;,&quot;gi&quot;),&quot;$1&quot;);a=a.replace(/\s*\n/gi,&quot;&lt;br /&gt;\n&quot;);a=a.replace(new RegExp(&quot;(&lt;/?(?:&quot;+b+&quot;)[^&gt;]*&gt;)\\s*&lt;br /&gt;&quot;,&quot;gi&quot;),&quot;$1&quot;);a=a.replace(/&lt;br \/&gt;(\s*&lt;\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)&gt;)/gi,&quot;$1&quot;);a=a.replace(/(?:&lt;p&gt;|&lt;br ?\/?&gt;)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:&lt;\/p&gt;|&lt;br ?\/?&gt;)*/gi,&quot;[caption$1[/caption]&quot;);a=a.replace(/(&lt;(?:div|th|td|form|fieldset|dd)[^&gt;]*&gt;)(.*?)&lt;\/p&gt;/g,function(e,d,f){if(f.match(/&lt;p( [^&gt;]*)?&gt;/)){return e}return d+&quot;&lt;p&gt;&quot;+f+&quot;&lt;/p&gt;&quot;});a=a.replace(/&lt;wp_temp_br&gt;/g,&quot;\n&quot;);return a},pre_wpautop:function(b){var a=this,d={o:a,data:b,unfiltered:b},c=typeof(jQuery)!=&quot;undefined&quot;;if(c){jQuery(&quot;body&quot;).trigger(&quot;befor
 ePreWpautop&quot;,[d])}d.data=a._wp_Nop(d.data);if(c){jQuery(&quot;body&quot;).trigger(&quot;afterPreWpautop&quot;,[d])}return d.data},wpautop:function(b){var a=this,d={o:a,data:b,unfiltered:b},c=typeof(jQuery)!=&quot;undefined&quot;;if(c){jQuery(&quot;body&quot;).trigger(&quot;beforeWpautop&quot;,[d])}d.data=a._wp_Autop(d.data);if(c){jQuery(&quot;body&quot;).trigger(&quot;afterWpautop&quot;,[d])}return d.data}};
</del><span class="cx">\ No newline at end of file
</span><ins>+var switchEditors={switchto:function(b){var c=b.id,a=c.length,e=c.substr(0,a-5),d=c.substr(a-4);this.go(e,d)},go:function(g,f){g=g||&quot;content&quot;;f=f||&quot;toggle&quot;;var c=this,b=tinyMCE.get(g),a,d,e=tinymce.DOM;a=&quot;wp-&quot;+g+&quot;-wrap&quot;;d=e.get(g);if(&quot;toggle&quot;==f){if(b&amp;&amp;!b.isHidden()){f=&quot;html&quot;}else{f=&quot;tmce&quot;}}if(&quot;tmce&quot;==f){if(b&amp;&amp;!b.isHidden()){return false}if(typeof(QTags)!=&quot;undefined&quot;){QTags.closeAllTags(g)}if(tinyMCEPreInit.mceInit[g]&amp;&amp;tinyMCEPreInit.mceInit[g].wpautop){d.value=c.wpautop(d.value)}if(b){b.show()}else{b=new tinymce.Editor(g,tinyMCEPreInit.mceInit[g]);b.render()}e.removeClass(a,&quot;html-active&quot;);e.addClass(a,&quot;tmce-active&quot;);setUserSetting(&quot;editor&quot;,&quot;tinymce&quot;)}else{if(&quot;html&quot;==f){if(b&amp;&amp;b.isHidden()){return false}if(b){d.style.height=b.getContentAreaContainer().offsetHeight+20+&quot;px&quot;;b.hide()}e.re
 moveClass(a,&quot;tmce-active&quot;);e.addClass(a,&quot;html-active&quot;);setUserSetting(&quot;editor&quot;,&quot;html&quot;)}}return false},_wp_Nop:function(b){var c,a;if(b.indexOf(&quot;&lt;pre&quot;)!=-1||b.indexOf(&quot;&lt;script&quot;)!=-1){b=b.replace(/&lt;(pre|script)[^&gt;]*&gt;[\s\S]+?&lt;\/\1&gt;/g,function(d){d=d.replace(/&lt;br ?\/?&gt;(\r\n|\n)?/g,&quot;&lt;wp_temp&gt;&quot;);return d.replace(/&lt;\/?p( [^&gt;]*)?&gt;(\r\n|\n)?/g,&quot;&lt;wp_temp&gt;&quot;)})}c=&quot;blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|div|h[1-6]|p|fieldset&quot;;b=b.replace(new RegExp(&quot;\\s*&lt;/(&quot;+c+&quot;)&gt;\\s*&quot;,&quot;g&quot;),&quot;&lt;/$1&gt;\n&quot;);b=b.replace(new RegExp(&quot;\\s*&lt;((?:&quot;+c+&quot;)(?: [^&gt;]*)?)&gt;&quot;,&quot;g&quot;),&quot;\n&lt;$1&gt;&quot;);b=b.replace(/(&lt;p [^&gt;]+&gt;.*?)&lt;\/p&gt;/g,&quot;$1&lt;/p#&gt;&quot;);b=b.replace(/&lt;div( [^&gt;]*)?&gt;\s*&lt;p&gt;/gi,&quot;&lt;div$1&gt;\n\n&quot;);b=b.replace(/\s*&lt;p&gt
 ;/gi,&quot;&quot;);b=b.replace(/\s*&lt;\/p&gt;\s*/gi,&quot;\n\n&quot;);b=b.replace(/\n[\s\u00a0]+\n/g,&quot;\n\n&quot;);b=b.replace(/\s*&lt;br ?\/?&gt;\s*/gi,&quot;\n&quot;);b=b.replace(/\s*&lt;div/g,&quot;\n&lt;div&quot;);b=b.replace(/&lt;\/div&gt;\s*/g,&quot;&lt;/div&gt;\n&quot;);b=b.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,&quot;\n\n[caption$1[/caption]\n\n&quot;);b=b.replace(/caption\]\n\n+\[caption/g,&quot;caption]\n\n[caption&quot;);a=&quot;blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|h[1-6]|pre|fieldset&quot;;b=b.replace(new RegExp(&quot;\\s*&lt;((?:&quot;+a+&quot;)(?: [^&gt;]*)?)\\s*&gt;&quot;,&quot;g&quot;),&quot;\n&lt;$1&gt;&quot;);b=b.replace(new RegExp(&quot;\\s*&lt;/(&quot;+a+&quot;)&gt;\\s*&quot;,&quot;g&quot;),&quot;&lt;/$1&gt;\n&quot;);b=b.replace(/&lt;li([^&gt;]*)&gt;/g,&quot;\t&lt;li$1&gt;&quot;);if(b.indexOf(&quot;&lt;hr&quot;)!=-1){b=b.replace(/\s*&lt;hr( [^&gt;]*)?&gt;\s*/g,&quot;\n\n&lt;hr$1&gt;\n\n&quot;)}if(b.indexOf(&quot;&lt;object&q
 uot;)!=-1){b=b.replace(/&lt;object[\s\S]+?&lt;\/object&gt;/g,function(d){return d.replace(/[\r\n]+/g,&quot;&quot;)})}b=b.replace(/&lt;\/p#&gt;/g,&quot;&lt;/p&gt;\n&quot;);b=b.replace(/\s*(&lt;p [^&gt;]+&gt;[\s\S]*?&lt;\/p&gt;)/g,&quot;\n$1&quot;);b=b.replace(/^\s+/,&quot;&quot;);b=b.replace(/[\s\u00a0]+$/,&quot;&quot;);b=b.replace(/&lt;wp_temp&gt;/g,&quot;\n&quot;);return b},_wp_Autop:function(a){var b=&quot;table|thead|tfoot|tbody|tr|td|th|caption|col|colgroup|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]|fieldset|legend|hr|noscript|menu|samp|header|footer|article|section|hgroup|nav|aside|details|summary&quot;;if(a.indexOf(&quot;&lt;object&quot;)!=-1){a=a.replace(/&lt;object[\s\S]+?&lt;\/object&gt;/g,function(c){return c.replace(/[\r\n]+/g,&quot;&quot;)})}a=a.replace(/&lt;[^&lt;&gt;]+&gt;/g,function(c){return c.replace(/[\r\n]+/g,&quot; &quot;)});if(a.indexOf(&quot;&lt;pre&quot;)!=-1||a.indexOf(&quot;&lt;script&quot;)!=-1){a=a.replace(/&lt;(pre|scri
 pt)[^&gt;]*&gt;[\s\S]+?&lt;\/\1&gt;/g,function(c){return c.replace(/(\r\n|\n)/g,&quot;&lt;wp_temp_br&gt;&quot;)})}a=a+&quot;\n\n&quot;;a=a.replace(/&lt;br \/&gt;\s*&lt;br \/&gt;/gi,&quot;\n\n&quot;);a=a.replace(new RegExp(&quot;(&lt;(?:&quot;+b+&quot;)(?: [^&gt;]*)?&gt;)&quot;,&quot;gi&quot;),&quot;\n$1&quot;);a=a.replace(new RegExp(&quot;(&lt;/(?:&quot;+b+&quot;)&gt;)&quot;,&quot;gi&quot;),&quot;$1\n\n&quot;);a=a.replace(/&lt;hr( [^&gt;]*)?&gt;/gi,&quot;&lt;hr$1&gt;\n\n&quot;);a=a.replace(/\r\n|\r/g,&quot;\n&quot;);a=a.replace(/\n\s*\n+/g,&quot;\n\n&quot;);a=a.replace(/([\s\S]+?)\n\n/g,&quot;&lt;p&gt;$1&lt;/p&gt;\n&quot;);a=a.replace(/&lt;p&gt;\s*?&lt;\/p&gt;/gi,&quot;&quot;);a=a.replace(new RegExp(&quot;&lt;p&gt;\\s*(&lt;/?(?:&quot;+b+&quot;)(?: [^&gt;]*)?&gt;)\\s*&lt;/p&gt;&quot;,&quot;gi&quot;),&quot;$1&quot;);a=a.replace(/&lt;p&gt;(&lt;li.+?)&lt;\/p&gt;/gi,&quot;$1&quot;);a=a.replace(/&lt;p&gt;\s*&lt;blockquote([^&gt;]*)&gt;/gi,&quot;&lt;blockquote$1&gt;&lt;p&gt;&quot;)
 ;a=a.replace(/&lt;\/blockquote&gt;\s*&lt;\/p&gt;/gi,&quot;&lt;/p&gt;&lt;/blockquote&gt;&quot;);a=a.replace(new RegExp(&quot;&lt;p&gt;\\s*(&lt;/?(?:&quot;+b+&quot;)(?: [^&gt;]*)?&gt;)&quot;,&quot;gi&quot;),&quot;$1&quot;);a=a.replace(new RegExp(&quot;(&lt;/?(?:&quot;+b+&quot;)(?: [^&gt;]*)?&gt;)\\s*&lt;/p&gt;&quot;,&quot;gi&quot;),&quot;$1&quot;);a=a.replace(/\s*\n/gi,&quot;&lt;br /&gt;\n&quot;);a=a.replace(new RegExp(&quot;(&lt;/?(?:&quot;+b+&quot;)[^&gt;]*&gt;)\\s*&lt;br /&gt;&quot;,&quot;gi&quot;),&quot;$1&quot;);a=a.replace(/&lt;br \/&gt;(\s*&lt;\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)&gt;)/gi,&quot;$1&quot;);a=a.replace(/(?:&lt;p&gt;|&lt;br ?\/?&gt;)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:&lt;\/p&gt;|&lt;br ?\/?&gt;)*/gi,&quot;[caption$1[/caption]&quot;);a=a.replace(/(&lt;(?:div|th|td|form|fieldset|dd)[^&gt;]*&gt;)(.*?)&lt;\/p&gt;/g,function(e,d,f){if(f.match(/&lt;p( [^&gt;]*)?&gt;/)){return e}return d+&quot;&lt;p&gt;&quot;+f+&quot;&lt;/p&gt;&quot;});a=a.replace(/&lt;wp_
 temp_br&gt;/g,&quot;\n&quot;);return a},pre_wpautop:function(b){var a=this,d={o:a,data:b,unfiltered:b},c=typeof(jQuery)!=&quot;undefined&quot;;if(c){jQuery(&quot;body&quot;).trigger(&quot;beforePreWpautop&quot;,[d])}d.data=a._wp_Nop(d.data);if(c){jQuery(&quot;body&quot;).trigger(&quot;afterPreWpautop&quot;,[d])}return d.data},wpautop:function(b){var a=this,d={o:a,data:b,unfiltered:b},c=typeof(jQuery)!=&quot;undefined&quot;;if(c){jQuery(&quot;body&quot;).trigger(&quot;beforeWpautop&quot;,[d])}d.data=a._wp_Autop(d.data);if(c){jQuery(&quot;body&quot;).trigger(&quot;afterWpautop&quot;,[d])}return d.data}};
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjswpfullscreendevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/wp-fullscreen.dev.js (19315 => 19316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/wp-fullscreen.dev.js        2011-11-16 22:55:59 UTC (rev 19315)
+++ trunk/wp-admin/js/wp-fullscreen.dev.js        2011-11-17 02:44:28 UTC (rev 19316)
</span><span class="lines">@@ -365,9 +365,9 @@
</span><span class="cx">                 var htmled_is_hidden = $('#' + s.editor_id).is(':hidden');
</span><span class="cx">                 // Make sure the correct editor is displaying.
</span><span class="cx">                 if ( s.has_tinymce &amp;&amp; s.mode === 'tinymce' &amp;&amp; !htmled_is_hidden ) {
</span><del>-                        switchEditors.go( $('#'+s.editor_id+'-tmce').get(0) );
</del><ins>+                        switchEditors.go(s.editor_id, 'tmce');
</ins><span class="cx">                 } else if ( s.mode === 'html' &amp;&amp; htmled_is_hidden ) {
</span><del>-                        switchEditors.go( $('#'+s.editor_id+'-html').get(0) );
</del><ins>+                        switchEditors.go(s.editor_id, 'html');
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 // Save content must be after switchEditors or content will be overwritten. See #17229.
</span></span></pre></div>
<a id="trunkwpadminjswpfullscreenjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/wp-fullscreen.js (19315 => 19316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/wp-fullscreen.js        2011-11-16 22:55:59 UTC (rev 19315)
+++ trunk/wp-admin/js/wp-fullscreen.js        2011-11-17 02:44:28 UTC (rev 19316)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var PubSub,fullscreen,wptitlehint;PubSub=function(){this.topics={}};PubSub.prototype.subscribe=function(a,b){if(!this.topics[a]){this.topics[a]=[]}this.topics[a].push(b);return b};PubSub.prototype.unsubscribe=function(b,e){var c,a,d=this.topics[b];if(!d){return e||[]}if(e){for(c=0,a=d.length;c&lt;a;c++){if(e==d[c]){d.splice(c,1)}}return e}else{this.topics[b]=[];return d}};PubSub.prototype.publish=function(c,b){var d,a,e,f=this.topics[c];if(!f){return}b=b||[];for(d=0,a=f.length;d&lt;a;d++){e=(f[d].apply(null,b)===false||e)}return !e};(function(c){var b,e,d,a;fullscreen=b={};e=b.pubsub=new PubSub();timer=0;block=false;a=b.settings={visible:false,mode:&quot;tinymce&quot;,editor_id:&quot;content&quot;,title_id:&quot;&quot;,timer:0,toolbar_shown:false};d=b.bounder=function(l,h,g,j){var k,i;g=g||1250;if(j){k=j.pageY||j.clientY||j.offsetY;i=c(document).scrollTop();if(!j.isDefaultPrevented){k=135+k}if(k-i&gt;120){return}}if(block){return}block=true;setTimeout(function(){
 block=false},400);if(a.timer){clearTimeout(a.timer)}else{e.publish(l)}function f(){e.publish(h);a.timer=0}a.timer=setTimeout(f,g)};b.on=function(){if(a.visible){return}if(typeof(wp_fullscreen_settings)==&quot;object&quot;){c.extend(a,wp_fullscreen_settings)}a.editor_id=wpActiveEditor||&quot;content&quot;;if(!a.title_id){if(c(&quot;input#title&quot;).length&amp;&amp;a.editor_id==&quot;content&quot;){a.title_id=&quot;title&quot;}else{if(c(&quot;input#&quot;+a.editor_id+&quot;-title&quot;).length){a.title_id=a.editor_id+&quot;-title&quot;}else{c(&quot;#wp-fullscreen-title, #wp-fullscreen-title-prompt-text&quot;).hide()}}}a.mode=c(&quot;#&quot;+a.editor_id).is(&quot;:hidden&quot;)?&quot;tinymce&quot;:&quot;html&quot;;a.qt_canvas=c(&quot;#&quot;+a.editor_id).get(0);if(!a.element){b.ui.init()}a.is_mce_on=a.has_tinymce&amp;&amp;typeof(tinyMCE.get(a.editor_id))!=&quot;undefined&quot;;b.ui.fade(&quot;show&quot;,&quot;showing&quot;,&quot;shown&quot;)};b.off=function(){if(!a.visible){r
 eturn}b.ui.fade(&quot;hide&quot;,&quot;hiding&quot;,&quot;hidden&quot;)};b.switchmode=function(g){var f=a.mode;if(!g||!a.visible||!a.has_tinymce){return f}if(f==g){return f}e.publish(&quot;switchMode&quot;,[f,g]);a.mode=g;e.publish(&quot;switchedMode&quot;,[f,g]);return g};b.save=function(){var h=c(&quot;#hiddenaction&quot;),f=h.val(),i=c(&quot;#wp-fullscreen-save img&quot;),g=c(&quot;#wp-fullscreen-save span&quot;);i.show();b.savecontent();h.val(&quot;wp-fullscreen-save-post&quot;);c.post(ajaxurl,c(&quot;form#post&quot;).serialize(),function(j){i.hide();g.show();setTimeout(function(){g.fadeOut(1000)},3000);if(j.last_edited){c(&quot;#wp-fullscreen-save input&quot;).attr(&quot;title&quot;,j.last_edited)}},&quot;json&quot;);h.val(f)};b.savecontent=function(){var f,g;if(a.title_id){c(&quot;#&quot;+a.title_id).val(c(&quot;#wp-fullscreen-title&quot;).val())}if(a.mode===&quot;tinymce&quot;&amp;&amp;(f=tinyMCE.get(&quot;wp_mce_fullscreen&quot;))){g=f.save()}else{g=c(&quot;#wp_mce_f
 ullscreen&quot;).val()}c(&quot;#&quot;+a.editor_id).val(g);c(document).triggerHandler(&quot;wpcountwords&quot;,[g])};set_title_hint=function(f){if(!f.val().length){f.siblings(&quot;label&quot;).css(&quot;visibility&quot;,&quot;&quot;)}else{f.siblings(&quot;label&quot;).css(&quot;visibility&quot;,&quot;hidden&quot;)}};b.dfw_width=function(h){var g=c(&quot;#wp-fullscreen-wrap&quot;),f=g.width();if(!h){g.width(c(&quot;#wp-fullscreen-central-toolbar&quot;).width());deleteUserSetting(&quot;dfw_width&quot;);return}f=h+f;if(f&lt;200||f&gt;1200){return}g.width(f);setUserSetting(&quot;dfw_width&quot;,f)};e.subscribe(&quot;showToolbar&quot;,function(){a.toolbars.removeClass(&quot;fade-1000&quot;).addClass(&quot;fade-300&quot;);b.fade.In(a.toolbars,300,function(){e.publish(&quot;toolbarShown&quot;)},true);c(&quot;#wp-fullscreen-body&quot;).addClass(&quot;wp-fullscreen-focus&quot;);a.toolbar_shown=true});e.subscribe(&quot;hideToolbar&quot;,function(){a.toolbars.removeClass(&quot;fade-30
 0&quot;).addClass(&quot;fade-1000&quot;);b.fade.Out(a.toolbars,1000,function(){e.publish(&quot;toolbarHidden&quot;)},true);c(&quot;#wp-fullscreen-body&quot;).removeClass(&quot;wp-fullscreen-focus&quot;)});e.subscribe(&quot;toolbarShown&quot;,function(){a.toolbars.removeClass(&quot;fade-300&quot;)});e.subscribe(&quot;toolbarHidden&quot;,function(){a.toolbars.removeClass(&quot;fade-1000&quot;);a.toolbar_shown=false});e.subscribe(&quot;show&quot;,function(){var f;if(a.title_id){f=c(&quot;#wp-fullscreen-title&quot;).val(c(&quot;#&quot;+a.title_id).val());set_title_hint(f)}c(&quot;#wp-fullscreen-save input&quot;).attr(&quot;title&quot;,c(&quot;#last-edit&quot;).text());a.textarea_obj.value=a.qt_canvas.value;if(a.has_tinymce&amp;&amp;a.mode===&quot;tinymce&quot;){tinyMCE.execCommand(&quot;wpFullScreenInit&quot;)}a.orig_y=c(window).scrollTop()});e.subscribe(&quot;showing&quot;,function(){c(document.body).addClass(&quot;fullscreen-active&quot;);b.refresh_buttons();c(document).bind(&
 quot;mousemove.fullscreen&quot;,function(f){d(&quot;showToolbar&quot;,&quot;hideToolbar&quot;,2000,f)});d(&quot;showToolbar&quot;,&quot;hideToolbar&quot;,2000);b.bind_resize();setTimeout(b.resize_textarea,200);scrollTo(0,0);c(&quot;#wpadminbar&quot;).hide()});e.subscribe(&quot;shown&quot;,function(){var f;a.visible=true;if(a.has_tinymce&amp;&amp;!a.is_mce_on){f=function(g,h){var k=h.getElement(),i=k.value,j=tinyMCEPreInit.mceInit[a.editor_id];if(j&amp;&amp;j.wpautop&amp;&amp;typeof(switchEditors)!=&quot;undefined&quot;){k.value=switchEditors.wpautop(k.value)}h.onInit.add(function(l){l.hide();l.getElement().value=i;tinymce.onAddEditor.remove(f)})};tinymce.onAddEditor.add(f);tinyMCE.init(tinyMCEPreInit.mceInit[a.editor_id]);a.is_mce_on=true}wpActiveEditor=&quot;wp_mce_fullscreen&quot;});e.subscribe(&quot;hide&quot;,function(){var f=c(&quot;#&quot;+a.editor_id).is(&quot;:hidden&quot;);if(a.has_tinymce&amp;&amp;a.mode===&quot;tinymce&quot;&amp;&amp;!f){switchEditors.go(c(&quot;#
 &quot;+a.editor_id+&quot;-tmce&quot;).get(0))}else{if(a.mode===&quot;html&quot;&amp;&amp;f){switchEditors.go(c(&quot;#&quot;+a.editor_id+&quot;-html&quot;).get(0))}}b.savecontent();c(document).unbind(&quot;.fullscreen&quot;);c(a.textarea_obj).unbind(&quot;.grow&quot;);if(a.has_tinymce&amp;&amp;a.mode===&quot;tinymce&quot;){tinyMCE.execCommand(&quot;wpFullScreenSave&quot;)}if(a.title_id){set_title_hint(c(&quot;#&quot;+a.title_id))}a.qt_canvas.value=a.textarea_obj.value});e.subscribe(&quot;hiding&quot;,function(){c(document.body).removeClass(&quot;fullscreen-active&quot;);scrollTo(0,a.orig_y);c(&quot;#wpadminbar&quot;).show()});e.subscribe(&quot;hidden&quot;,function(){a.visible=false;c(&quot;#wp_mce_fullscreen, #wp-fullscreen-title&quot;).removeAttr(&quot;style&quot;);if(a.has_tinymce&amp;&amp;a.is_mce_on){tinyMCE.execCommand(&quot;wpFullScreenClose&quot;)}a.textarea_obj.value=&quot;&quot;;b.oldheight=0;wpActiveEditor=a.editor_id});e.subscribe(&quot;switchMode&quot;,function(
 h,g){var f;if(!a.has_tinymce||!a.is_mce_on){return}f=tinyMCE.get(&quot;wp_mce_fullscreen&quot;);if(h===&quot;html&quot;&amp;&amp;g===&quot;tinymce&quot;){if(tinyMCE.get(a.editor_id).getParam(&quot;wpautop&quot;)&amp;&amp;typeof(switchEditors)!=&quot;undefined&quot;){a.textarea_obj.value=switchEditors.wpautop(a.textarea_obj.value)}if(&quot;undefined&quot;==typeof(f)){tinyMCE.execCommand(&quot;wpFullScreenInit&quot;)}else{f.show()}}else{if(h===&quot;tinymce&quot;&amp;&amp;g===&quot;html&quot;){if(f){f.hide()}}}});e.subscribe(&quot;switchedMode&quot;,function(g,f){b.refresh_buttons(true);if(f===&quot;html&quot;){setTimeout(b.resize_textarea,200)}});b.b=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;Bold&quot;)}};b.i=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;Italic&quot;)}};b.ul=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;InsertUnorder
 edList&quot;)}};b.ol=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;InsertOrderedList&quot;)}};b.link=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;WP_Link&quot;)}else{wpLink.open()}};b.unlink=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;unlink&quot;)}};b.atd=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;mceWritingImprovementTool&quot;)}};b.help=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;WP_Help&quot;)}};b.blockquote=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;mceBlockQuote&quot;)}};b.medialib=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;WP_Medialib&quot;)}else{var f=c(&quot;#wp-&quot;+a.editor_id+&quot;-media-buttons a.thickbox&quot;).attr(&quot
 ;href&quot;)||&quot;&quot;;if(f){tb_show(&quot;&quot;,f)}}};b.refresh_buttons=function(f){f=f||false;if(a.mode===&quot;html&quot;){c(&quot;#wp-fullscreen-mode-bar&quot;).removeClass(&quot;wp-tmce-mode&quot;).addClass(&quot;wp-html-mode&quot;);if(f){c(&quot;#wp-fullscreen-button-bar&quot;).fadeOut(150,function(){c(this).addClass(&quot;wp-html-mode&quot;).fadeIn(150)})}else{c(&quot;#wp-fullscreen-button-bar&quot;).addClass(&quot;wp-html-mode&quot;)}}else{if(a.mode===&quot;tinymce&quot;){c(&quot;#wp-fullscreen-mode-bar&quot;).removeClass(&quot;wp-html-mode&quot;).addClass(&quot;wp-tmce-mode&quot;);if(f){c(&quot;#wp-fullscreen-button-bar&quot;).fadeOut(150,function(){c(this).removeClass(&quot;wp-html-mode&quot;).fadeIn(150)})}else{c(&quot;#wp-fullscreen-button-bar&quot;).removeClass(&quot;wp-html-mode&quot;)}}}};b.ui={init:function(){var f=c(&quot;#fullscreen-topbar&quot;),h=c(&quot;#wp_mce_fullscreen&quot;),g=0;a.toolbars=f.add(c(&quot;#wp-fullscreen-status&quot;));a.element=c(
 &quot;#fullscreen-fader&quot;);a.textarea_obj=h[0];a.has_tinymce=typeof(tinymce)!=&quot;undefined&quot;;if(!a.has_tinymce){c(&quot;#wp-fullscreen-mode-bar&quot;).hide()}if(wptitlehint&amp;&amp;c(&quot;#wp-fullscreen-title&quot;).length){wptitlehint(&quot;wp-fullscreen-title&quot;)}c(document).keyup(function(k){var l=k.keyCode||k.charCode,i,j;if(!fullscreen.settings.visible){return true}if(navigator.platform&amp;&amp;navigator.platform.indexOf(&quot;Mac&quot;)!=-1){i=k.ctrlKey}else{i=k.altKey}if(27==l){j={event:k,what:&quot;dfw&quot;,cb:fullscreen.off,condition:function(){if(c(&quot;#TB_window&quot;).is(&quot;:visible&quot;)||c(&quot;.wp-dialog&quot;).is(&quot;:visible&quot;)){return false}return true}};if(!jQuery(document).triggerHandler(&quot;wp_CloseOnEscape&quot;,[j])){fullscreen.off()}}if(i&amp;&amp;(61==l||107==l||187==l)){b.dfw_width(25)}if(i&amp;&amp;(45==l||109==l||189==l)){b.dfw_width(-25)}if(i&amp;&amp;48==l){b.dfw_width(0)}return false});if(typeof(wpWordCount)!=&q
 uot;undefined&quot;){h.keyup(function(j){var i=j.keyCode||j.charCode;if(i==g){return true}if(13==i||8==g||46==g){c(document).triggerHandler(&quot;wpcountwords&quot;,[h.val()])}g=i;return true})}f.mouseenter(function(i){a.toolbars.addClass(&quot;fullscreen-make-sticky&quot;);c(document).unbind(&quot;.fullscreen&quot;);clearTimeout(a.timer);a.timer=0}).mouseleave(function(i){a.toolbars.removeClass(&quot;fullscreen-make-sticky&quot;);if(a.visible){c(document).bind(&quot;mousemove.fullscreen&quot;,function(j){d(&quot;showToolbar&quot;,&quot;hideToolbar&quot;,2000,j)})}})},fade:function(g,f,h){if(!a.element){b.ui.init()}if(g&amp;&amp;!e.publish(g)){return}b.fade.In(a.element,600,function(){if(f){e.publish(f)}b.fade.Out(a.element,600,function(){if(h){e.publish(h)}})})}};b.fade={transitionend:&quot;transitionend webkitTransitionEnd oTransitionEnd&quot;,sensitivity:100,In:function(g,h,i,f){i=i||c.noop;h=h||400;f=f||false;if(b.fade.transitions){if(g.is(&quot;:visible&quot;)){g.addCla
 ss(&quot;fade-trigger&quot;);return g}g.show();g.first().one(this.transitionend,function(){i()});setTimeout(function(){g.addClass(&quot;fade-trigger&quot;)},this.sensitivity)}else{if(f){g.stop()}g.css(&quot;opacity&quot;,1);g.first().fadeIn(h,i);if(g.length&gt;1){g.not(&quot;:first&quot;).fadeIn(h)}}return g},Out:function(g,h,i,f){i=i||c.noop;h=h||400;f=f||false;if(!g.is(&quot;:visible&quot;)){return g}if(b.fade.transitions){g.first().one(b.fade.transitionend,function(){if(g.hasClass(&quot;fade-trigger&quot;)){return}g.hide();i()});setTimeout(function(){g.removeClass(&quot;fade-trigger&quot;)},this.sensitivity)}else{if(f){g.stop()}g.first().fadeOut(h,i);if(g.length&gt;1){g.not(&quot;:first&quot;).fadeOut(h)}}return g},transitions:(function(){var f=document.documentElement.style;return(typeof(f.WebkitTransition)==&quot;string&quot;||typeof(f.MozTransition)==&quot;string&quot;||typeof(f.OTransition)==&quot;string&quot;||typeof(f.transition)==&quot;string&quot;)})()};b.bind_res
 ize=function(){c(a.textarea_obj).bind(&quot;keypress.grow click.grow paste.grow&quot;,function(){setTimeout(b.resize_textarea,200)})};b.oldheight=0;b.resize_textarea=function(){var f=a.textarea_obj,g;g=f.scrollHeight&gt;300?f.scrollHeight:300;if(g!=b.oldheight){f.style.height=g+&quot;px&quot;;b.oldheight=g}}})(jQuery);
</del><span class="cx">\ No newline at end of file
</span><ins>+var PubSub,fullscreen,wptitlehint;PubSub=function(){this.topics={}};PubSub.prototype.subscribe=function(a,b){if(!this.topics[a]){this.topics[a]=[]}this.topics[a].push(b);return b};PubSub.prototype.unsubscribe=function(b,e){var c,a,d=this.topics[b];if(!d){return e||[]}if(e){for(c=0,a=d.length;c&lt;a;c++){if(e==d[c]){d.splice(c,1)}}return e}else{this.topics[b]=[];return d}};PubSub.prototype.publish=function(c,b){var d,a,e,f=this.topics[c];if(!f){return}b=b||[];for(d=0,a=f.length;d&lt;a;d++){e=(f[d].apply(null,b)===false||e)}return !e};(function(c){var b,e,d,a;fullscreen=b={};e=b.pubsub=new PubSub();timer=0;block=false;a=b.settings={visible:false,mode:&quot;tinymce&quot;,editor_id:&quot;content&quot;,title_id:&quot;&quot;,timer:0,toolbar_shown:false};d=b.bounder=function(l,h,g,j){var k,i;g=g||1250;if(j){k=j.pageY||j.clientY||j.offsetY;i=c(document).scrollTop();if(!j.isDefaultPrevented){k=135+k}if(k-i&gt;120){return}}if(block){return}block=true;setTimeout(function(){
 block=false},400);if(a.timer){clearTimeout(a.timer)}else{e.publish(l)}function f(){e.publish(h);a.timer=0}a.timer=setTimeout(f,g)};b.on=function(){if(a.visible){return}if(typeof(wp_fullscreen_settings)==&quot;object&quot;){c.extend(a,wp_fullscreen_settings)}a.editor_id=wpActiveEditor||&quot;content&quot;;if(!a.title_id){if(c(&quot;input#title&quot;).length&amp;&amp;a.editor_id==&quot;content&quot;){a.title_id=&quot;title&quot;}else{if(c(&quot;input#&quot;+a.editor_id+&quot;-title&quot;).length){a.title_id=a.editor_id+&quot;-title&quot;}else{c(&quot;#wp-fullscreen-title, #wp-fullscreen-title-prompt-text&quot;).hide()}}}a.mode=c(&quot;#&quot;+a.editor_id).is(&quot;:hidden&quot;)?&quot;tinymce&quot;:&quot;html&quot;;a.qt_canvas=c(&quot;#&quot;+a.editor_id).get(0);if(!a.element){b.ui.init()}a.is_mce_on=a.has_tinymce&amp;&amp;typeof(tinyMCE.get(a.editor_id))!=&quot;undefined&quot;;b.ui.fade(&quot;show&quot;,&quot;showing&quot;,&quot;shown&quot;)};b.off=function(){if(!a.visible){r
 eturn}b.ui.fade(&quot;hide&quot;,&quot;hiding&quot;,&quot;hidden&quot;)};b.switchmode=function(g){var f=a.mode;if(!g||!a.visible||!a.has_tinymce){return f}if(f==g){return f}e.publish(&quot;switchMode&quot;,[f,g]);a.mode=g;e.publish(&quot;switchedMode&quot;,[f,g]);return g};b.save=function(){var h=c(&quot;#hiddenaction&quot;),f=h.val(),i=c(&quot;#wp-fullscreen-save img&quot;),g=c(&quot;#wp-fullscreen-save span&quot;);i.show();b.savecontent();h.val(&quot;wp-fullscreen-save-post&quot;);c.post(ajaxurl,c(&quot;form#post&quot;).serialize(),function(j){i.hide();g.show();setTimeout(function(){g.fadeOut(1000)},3000);if(j.last_edited){c(&quot;#wp-fullscreen-save input&quot;).attr(&quot;title&quot;,j.last_edited)}},&quot;json&quot;);h.val(f)};b.savecontent=function(){var f,g;if(a.title_id){c(&quot;#&quot;+a.title_id).val(c(&quot;#wp-fullscreen-title&quot;).val())}if(a.mode===&quot;tinymce&quot;&amp;&amp;(f=tinyMCE.get(&quot;wp_mce_fullscreen&quot;))){g=f.save()}else{g=c(&quot;#wp_mce_f
 ullscreen&quot;).val()}c(&quot;#&quot;+a.editor_id).val(g);c(document).triggerHandler(&quot;wpcountwords&quot;,[g])};set_title_hint=function(f){if(!f.val().length){f.siblings(&quot;label&quot;).css(&quot;visibility&quot;,&quot;&quot;)}else{f.siblings(&quot;label&quot;).css(&quot;visibility&quot;,&quot;hidden&quot;)}};b.dfw_width=function(h){var g=c(&quot;#wp-fullscreen-wrap&quot;),f=g.width();if(!h){g.width(c(&quot;#wp-fullscreen-central-toolbar&quot;).width());deleteUserSetting(&quot;dfw_width&quot;);return}f=h+f;if(f&lt;200||f&gt;1200){return}g.width(f);setUserSetting(&quot;dfw_width&quot;,f)};e.subscribe(&quot;showToolbar&quot;,function(){a.toolbars.removeClass(&quot;fade-1000&quot;).addClass(&quot;fade-300&quot;);b.fade.In(a.toolbars,300,function(){e.publish(&quot;toolbarShown&quot;)},true);c(&quot;#wp-fullscreen-body&quot;).addClass(&quot;wp-fullscreen-focus&quot;);a.toolbar_shown=true});e.subscribe(&quot;hideToolbar&quot;,function(){a.toolbars.removeClass(&quot;fade-30
 0&quot;).addClass(&quot;fade-1000&quot;);b.fade.Out(a.toolbars,1000,function(){e.publish(&quot;toolbarHidden&quot;)},true);c(&quot;#wp-fullscreen-body&quot;).removeClass(&quot;wp-fullscreen-focus&quot;)});e.subscribe(&quot;toolbarShown&quot;,function(){a.toolbars.removeClass(&quot;fade-300&quot;)});e.subscribe(&quot;toolbarHidden&quot;,function(){a.toolbars.removeClass(&quot;fade-1000&quot;);a.toolbar_shown=false});e.subscribe(&quot;show&quot;,function(){var f;if(a.title_id){f=c(&quot;#wp-fullscreen-title&quot;).val(c(&quot;#&quot;+a.title_id).val());set_title_hint(f)}c(&quot;#wp-fullscreen-save input&quot;).attr(&quot;title&quot;,c(&quot;#last-edit&quot;).text());a.textarea_obj.value=a.qt_canvas.value;if(a.has_tinymce&amp;&amp;a.mode===&quot;tinymce&quot;){tinyMCE.execCommand(&quot;wpFullScreenInit&quot;)}a.orig_y=c(window).scrollTop()});e.subscribe(&quot;showing&quot;,function(){c(document.body).addClass(&quot;fullscreen-active&quot;);b.refresh_buttons();c(document).bind(&
 quot;mousemove.fullscreen&quot;,function(f){d(&quot;showToolbar&quot;,&quot;hideToolbar&quot;,2000,f)});d(&quot;showToolbar&quot;,&quot;hideToolbar&quot;,2000);b.bind_resize();setTimeout(b.resize_textarea,200);scrollTo(0,0);c(&quot;#wpadminbar&quot;).hide()});e.subscribe(&quot;shown&quot;,function(){var f;a.visible=true;if(a.has_tinymce&amp;&amp;!a.is_mce_on){f=function(g,h){var k=h.getElement(),i=k.value,j=tinyMCEPreInit.mceInit[a.editor_id];if(j&amp;&amp;j.wpautop&amp;&amp;typeof(switchEditors)!=&quot;undefined&quot;){k.value=switchEditors.wpautop(k.value)}h.onInit.add(function(l){l.hide();l.getElement().value=i;tinymce.onAddEditor.remove(f)})};tinymce.onAddEditor.add(f);tinyMCE.init(tinyMCEPreInit.mceInit[a.editor_id]);a.is_mce_on=true}wpActiveEditor=&quot;wp_mce_fullscreen&quot;});e.subscribe(&quot;hide&quot;,function(){var f=c(&quot;#&quot;+a.editor_id).is(&quot;:hidden&quot;);if(a.has_tinymce&amp;&amp;a.mode===&quot;tinymce&quot;&amp;&amp;!f){switchEditors.go(a.editor_
 id,&quot;tmce&quot;)}else{if(a.mode===&quot;html&quot;&amp;&amp;f){switchEditors.go(a.editor_id,&quot;html&quot;)}}b.savecontent();c(document).unbind(&quot;.fullscreen&quot;);c(a.textarea_obj).unbind(&quot;.grow&quot;);if(a.has_tinymce&amp;&amp;a.mode===&quot;tinymce&quot;){tinyMCE.execCommand(&quot;wpFullScreenSave&quot;)}if(a.title_id){set_title_hint(c(&quot;#&quot;+a.title_id))}a.qt_canvas.value=a.textarea_obj.value});e.subscribe(&quot;hiding&quot;,function(){c(document.body).removeClass(&quot;fullscreen-active&quot;);scrollTo(0,a.orig_y);c(&quot;#wpadminbar&quot;).show()});e.subscribe(&quot;hidden&quot;,function(){a.visible=false;c(&quot;#wp_mce_fullscreen, #wp-fullscreen-title&quot;).removeAttr(&quot;style&quot;);if(a.has_tinymce&amp;&amp;a.is_mce_on){tinyMCE.execCommand(&quot;wpFullScreenClose&quot;)}a.textarea_obj.value=&quot;&quot;;b.oldheight=0;wpActiveEditor=a.editor_id});e.subscribe(&quot;switchMode&quot;,function(h,g){var f;if(!a.has_tinymce||!a.is_mce_on){return
 }f=tinyMCE.get(&quot;wp_mce_fullscreen&quot;);if(h===&quot;html&quot;&amp;&amp;g===&quot;tinymce&quot;){if(tinyMCE.get(a.editor_id).getParam(&quot;wpautop&quot;)&amp;&amp;typeof(switchEditors)!=&quot;undefined&quot;){a.textarea_obj.value=switchEditors.wpautop(a.textarea_obj.value)}if(&quot;undefined&quot;==typeof(f)){tinyMCE.execCommand(&quot;wpFullScreenInit&quot;)}else{f.show()}}else{if(h===&quot;tinymce&quot;&amp;&amp;g===&quot;html&quot;){if(f){f.hide()}}}});e.subscribe(&quot;switchedMode&quot;,function(g,f){b.refresh_buttons(true);if(f===&quot;html&quot;){setTimeout(b.resize_textarea,200)}});b.b=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;Bold&quot;)}};b.i=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;Italic&quot;)}};b.ul=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;InsertUnorderedList&quot;)}};b.ol=function(){if(a.has_tinymce&a
 mp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;InsertOrderedList&quot;)}};b.link=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;WP_Link&quot;)}else{wpLink.open()}};b.unlink=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;unlink&quot;)}};b.atd=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;mceWritingImprovementTool&quot;)}};b.help=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;WP_Help&quot;)}};b.blockquote=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;mceBlockQuote&quot;)}};b.medialib=function(){if(a.has_tinymce&amp;&amp;&quot;tinymce&quot;===a.mode){tinyMCE.execCommand(&quot;WP_Medialib&quot;)}else{var f=c(&quot;#wp-&quot;+a.editor_id+&quot;-media-buttons a.thickbox&quot;).attr(&quot;href&quot;)||&quot;&quot;;if(f){tb_show(&quot;&qu
 ot;,f)}}};b.refresh_buttons=function(f){f=f||false;if(a.mode===&quot;html&quot;){c(&quot;#wp-fullscreen-mode-bar&quot;).removeClass(&quot;wp-tmce-mode&quot;).addClass(&quot;wp-html-mode&quot;);if(f){c(&quot;#wp-fullscreen-button-bar&quot;).fadeOut(150,function(){c(this).addClass(&quot;wp-html-mode&quot;).fadeIn(150)})}else{c(&quot;#wp-fullscreen-button-bar&quot;).addClass(&quot;wp-html-mode&quot;)}}else{if(a.mode===&quot;tinymce&quot;){c(&quot;#wp-fullscreen-mode-bar&quot;).removeClass(&quot;wp-html-mode&quot;).addClass(&quot;wp-tmce-mode&quot;);if(f){c(&quot;#wp-fullscreen-button-bar&quot;).fadeOut(150,function(){c(this).removeClass(&quot;wp-html-mode&quot;).fadeIn(150)})}else{c(&quot;#wp-fullscreen-button-bar&quot;).removeClass(&quot;wp-html-mode&quot;)}}}};b.ui={init:function(){var f=c(&quot;#fullscreen-topbar&quot;),h=c(&quot;#wp_mce_fullscreen&quot;),g=0;a.toolbars=f.add(c(&quot;#wp-fullscreen-status&quot;));a.element=c(&quot;#fullscreen-fader&quot;);a.textarea_obj=h[0]
 ;a.has_tinymce=typeof(tinymce)!=&quot;undefined&quot;;if(!a.has_tinymce){c(&quot;#wp-fullscreen-mode-bar&quot;).hide()}if(wptitlehint&amp;&amp;c(&quot;#wp-fullscreen-title&quot;).length){wptitlehint(&quot;wp-fullscreen-title&quot;)}c(document).keyup(function(k){var l=k.keyCode||k.charCode,i,j;if(!fullscreen.settings.visible){return true}if(navigator.platform&amp;&amp;navigator.platform.indexOf(&quot;Mac&quot;)!=-1){i=k.ctrlKey}else{i=k.altKey}if(27==l){j={event:k,what:&quot;dfw&quot;,cb:fullscreen.off,condition:function(){if(c(&quot;#TB_window&quot;).is(&quot;:visible&quot;)||c(&quot;.wp-dialog&quot;).is(&quot;:visible&quot;)){return false}return true}};if(!jQuery(document).triggerHandler(&quot;wp_CloseOnEscape&quot;,[j])){fullscreen.off()}}if(i&amp;&amp;(61==l||107==l||187==l)){b.dfw_width(25)}if(i&amp;&amp;(45==l||109==l||189==l)){b.dfw_width(-25)}if(i&amp;&amp;48==l){b.dfw_width(0)}return false});if(typeof(wpWordCount)!=&quot;undefined&quot;){h.keyup(function(j){var i=j.k
 eyCode||j.charCode;if(i==g){return true}if(13==i||8==g||46==g){c(document).triggerHandler(&quot;wpcountwords&quot;,[h.val()])}g=i;return true})}f.mouseenter(function(i){a.toolbars.addClass(&quot;fullscreen-make-sticky&quot;);c(document).unbind(&quot;.fullscreen&quot;);clearTimeout(a.timer);a.timer=0}).mouseleave(function(i){a.toolbars.removeClass(&quot;fullscreen-make-sticky&quot;);if(a.visible){c(document).bind(&quot;mousemove.fullscreen&quot;,function(j){d(&quot;showToolbar&quot;,&quot;hideToolbar&quot;,2000,j)})}})},fade:function(g,f,h){if(!a.element){b.ui.init()}if(g&amp;&amp;!e.publish(g)){return}b.fade.In(a.element,600,function(){if(f){e.publish(f)}b.fade.Out(a.element,600,function(){if(h){e.publish(h)}})})}};b.fade={transitionend:&quot;transitionend webkitTransitionEnd oTransitionEnd&quot;,sensitivity:100,In:function(g,h,i,f){i=i||c.noop;h=h||400;f=f||false;if(b.fade.transitions){if(g.is(&quot;:visible&quot;)){g.addClass(&quot;fade-trigger&quot;);return g}g.show();g.f
 irst().one(this.transitionend,function(){i()});setTimeout(function(){g.addClass(&quot;fade-trigger&quot;)},this.sensitivity)}else{if(f){g.stop()}g.css(&quot;opacity&quot;,1);g.first().fadeIn(h,i);if(g.length&gt;1){g.not(&quot;:first&quot;).fadeIn(h)}}return g},Out:function(g,h,i,f){i=i||c.noop;h=h||400;f=f||false;if(!g.is(&quot;:visible&quot;)){return g}if(b.fade.transitions){g.first().one(b.fade.transitionend,function(){if(g.hasClass(&quot;fade-trigger&quot;)){return}g.hide();i()});setTimeout(function(){g.removeClass(&quot;fade-trigger&quot;)},this.sensitivity)}else{if(f){g.stop()}g.first().fadeOut(h,i);if(g.length&gt;1){g.not(&quot;:first&quot;).fadeOut(h)}}return g},transitions:(function(){var f=document.documentElement.style;return(typeof(f.WebkitTransition)==&quot;string&quot;||typeof(f.MozTransition)==&quot;string&quot;||typeof(f.OTransition)==&quot;string&quot;||typeof(f.transition)==&quot;string&quot;)})()};b.bind_resize=function(){c(a.textarea_obj).bind(&quot;keypre
 ss.grow click.grow paste.grow&quot;,function(){setTimeout(b.resize_textarea,200)})};b.oldheight=0;b.resize_textarea=function(){var f=a.textarea_obj,g;g=f.scrollHeight&gt;300?f.scrollHeight:300;if(g!=b.oldheight){f.style.height=g+&quot;px&quot;;b.oldheight=g}}})(jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesclasswpeditorphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-wp-editor.php (19315 => 19316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-editor.php        2011-11-16 22:55:59 UTC (rev 19315)
+++ trunk/wp-includes/class-wp-editor.php        2011-11-17 02:44:28 UTC (rev 19316)
</span><span class="lines">@@ -83,8 +83,8 @@
</span><span class="cx">                                 $switch_class = 'tmce-active';
</span><span class="cx">                         }
</span><span class="cx"> 
</span><del>-                        $buttons .= '&lt;a id=&quot;' . $editor_id . '-html&quot; class=&quot;hide-if-no-js wp-switch-editor switch-html&quot; onclick=&quot;switchEditors.go(this);return false;&quot;&gt;' . __('HTML') . &quot;&lt;/a&gt;\n&quot;;
-                        $buttons .= '&lt;a id=&quot;' . $editor_id . '-tmce&quot; class=&quot;hide-if-no-js wp-switch-editor switch-tmce&quot; onclick=&quot;switchEditors.go(this);return false;&quot;&gt;' . __('Visual') . &quot;&lt;/a&gt;\n&quot;;
</del><ins>+                        $buttons .= '&lt;a id=&quot;' . $editor_id . '-html&quot; class=&quot;hide-if-no-js wp-switch-editor switch-html&quot; onclick=&quot;switchEditors.switchto(this);&quot;&gt;' . __('HTML') . &quot;&lt;/a&gt;\n&quot;;
+                        $buttons .= '&lt;a id=&quot;' . $editor_id . '-tmce&quot; class=&quot;hide-if-no-js wp-switch-editor switch-tmce&quot; onclick=&quot;switchEditors.switchto(this);&quot;&gt;' . __('Visual') . &quot;&lt;/a&gt;\n&quot;;
</ins><span class="cx">                 } else {
</span><span class="cx">                         if ( $this-&gt;this_tinymce )
</span><span class="cx">                                 $this-&gt;has_tinymce = true;
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (19315 => 19316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2011-11-16 22:55:59 UTC (rev 19315)
+++ trunk/wp-includes/script-loader.php        2011-11-17 02:44:28 UTC (rev 19316)
</span><span class="lines">@@ -84,9 +84,9 @@
</span><span class="cx"> 
</span><span class="cx">         $scripts-&gt;add( 'colorpicker', &quot;/wp-includes/js/colorpicker$suffix.js&quot;, array('prototype'), '3517m' );
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'editor', &quot;/wp-admin/js/editor$suffix.js&quot;, array('utils','jquery'), '20110820', 1 );
</del><ins>+        $scripts-&gt;add( 'editor', &quot;/wp-admin/js/editor$suffix.js&quot;, array('utils','jquery'), '20111116', 1 );
</ins><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'wp-fullscreen', &quot;/wp-admin/js/wp-fullscreen$suffix.js&quot;, array('jquery'), '20110929', 1 );
</del><ins>+        $scripts-&gt;add( 'wp-fullscreen', &quot;/wp-admin/js/wp-fullscreen$suffix.js&quot;, array('jquery'), '20111116', 1 );
</ins><span class="cx"> 
</span><span class="cx">         $scripts-&gt;add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6.1');
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>