<!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>[18576] trunk: Fix QTags.closeAllTags(), replace 'tb' with 'ed' in quicktags,js to make it clear it is the editor instance not the toolbar, small comments quick edit fixes, see #16695, fixes #15911</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/18576">18576</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2011-08-20 19:55:51 +0000 (Sat, 20 Aug 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix QTags.closeAllTags(), replace 'tb' with 'ed' in quicktags,js to make it clear it is the editor instance not the toolbar, small comments quick edit fixes, see <a href="http://core.trac.wordpress.org/ticket/16695">#16695</a>, fixes <a href="http://core.trac.wordpress.org/ticket/15911">#15911</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminjseditcommentsdevjs">trunk/wp-admin/js/edit-comments.dev.js</a></li>
<li><a href="#trunkwpadminjseditcommentsjs">trunk/wp-admin/js/edit-comments.js</a></li>
<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="#trunkwpincludesjsquicktagsdevjs">trunk/wp-includes/js/quicktags.dev.js</a></li>
<li><a href="#trunkwpincludesjsquicktagsjs">trunk/wp-includes/js/quicktags.js</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminjseditcommentsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/edit-comments.dev.js (18575 => 18576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/edit-comments.dev.js        2011-08-19 21:23:31 UTC (rev 18575)
+++ trunk/wp-admin/js/edit-comments.dev.js        2011-08-20 19:55:51 UTC (rev 18576)
</span><span class="lines">@@ -356,6 +356,9 @@
</span><span class="cx">                 if ( this.cid ) {
</span><span class="cx">                         c = $('#comment-' + this.cid);
</span><span class="cx"> 
</span><ins>+                        if ( typeof QTags != 'undefined' )
+                                QTags.closeAllTags('replycontent');
+
</ins><span class="cx">                         if ( this.act == 'edit-comment' )
</span><span class="cx">                                 c.fadeIn(300, function(){ c.show() }).css('backgroundColor', '');
</span><span class="cx"> 
</span><span class="lines">@@ -365,18 +368,14 @@
</span><span class="cx">                         $('input', '#edithead').val('');
</span><span class="cx">                         $('.error', '#replysubmit').html('').hide();
</span><span class="cx">                         $('.waiting', '#replysubmit').hide();
</span><ins>+                        $('#replycontainer, #replycontent').height(120);
</ins><span class="cx"> 
</span><del>-                        if ( $.browser.msie )
-                                $('#replycontainer, #replycontent').css('height', '120px');
-                        else
-                                $('#replycontainer').resizable('destroy').css('height', '120px');
-
</del><span class="cx">                         this.cid = '';
</span><span class="cx">                 }
</span><span class="cx">         },
</span><span class="cx"> 
</span><span class="cx">         open : function(id, p, a) {
</span><del>-                var t = this, editRow, rowData, act, h, c = $('#comment-' + id), replyButton;
</del><ins>+                var t = this, editRow, rowData, act, c = $('#comment-' + id), h = c.height(), replyButton;
</ins><span class="cx"> 
</span><span class="cx">                 t.close();
</span><span class="cx">                 t.cid = id;
</span><span class="lines">@@ -389,6 +388,9 @@
</span><span class="cx">                 $('#comment_post_ID', editRow).val(p);
</span><span class="cx">                 $('#comment_ID', editRow).val(id);
</span><span class="cx"> 
</span><ins>+                if ( h &gt; 220 )
+                        $('#replycontainer, #replycontent', editRow).height(h-104);
+
</ins><span class="cx">                 if ( a == 'edit' ) {
</span><span class="cx">                         $('#author', editRow).val( $('div.author', rowData).text() );
</span><span class="cx">                         $('#author-email', editRow).val( $('div.author-email', rowData).text() );
</span><span class="lines">@@ -398,13 +400,6 @@
</span><span class="cx">                         $('#edithead, #savebtn', editRow).show();
</span><span class="cx">                         $('#replyhead, #replybtn', editRow).hide();
</span><span class="cx"> 
</span><del>-                        h = c.height();
-                        if ( h &gt; 220 )
-                                if ( $.browser.msie )
-                                        $('#replycontainer, #replycontent', editRow).height(h-105);
-                                else
-                                        $('#replycontainer', editRow).height(h-105);
-
</del><span class="cx">                         c.after( editRow ).fadeOut('fast', function(){
</span><span class="cx">                                 $('#replyrow').fadeIn(300, function(){ $(this).show() });
</span><span class="cx">                         });
</span></span></pre></div>
<a id="trunkwpadminjseditcommentsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/edit-comments.js (18575 => 18576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/edit-comments.js        2011-08-19 21:23:31 UTC (rev 18575)
+++ trunk/wp-admin/js/edit-comments.js        2011-08-20 19:55:51 UTC (rev 18576)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var theList,theExtraList,toggleWithKeyboard=false,getCount,updateCount,updatePending,dashboardTotals;(function(a){setCommentsList=function(){var c,e,g,j=0,f,h,d,i,b;c=a('input[name=&quot;_total&quot;]',&quot;#comments-form&quot;);e=a('input[name=&quot;_per_page&quot;]',&quot;#comments-form&quot;);g=a('input[name=&quot;_page&quot;]',&quot;#comments-form&quot;);f=function(n,l){var p=a(&quot;#&quot;+l.element),k,o,m;k=a(&quot;#replyrow&quot;);o=a(&quot;#comment_ID&quot;,k).val();m=a(&quot;#replybtn&quot;,k);if(p.is(&quot;.unapproved&quot;)){if(l.data.id==o){m.text(adminCommentsL10n.replyApprove)}p.find(&quot;div.comment_status&quot;).html(&quot;0&quot;)}else{if(l.data.id==o){m.text(adminCommentsL10n.reply)}p.find(&quot;div.comment_status&quot;).html(&quot;1&quot;)}a(&quot;span.pending-count&quot;).each(function(){var q=a(this),s,r;s=q.html().replace(/[^0-9]+/g,&quot;&quot;);s=parseInt(s,10);if(isNaN(s)){return}r=a(&quot;#&quot;+l.element).is(&quot;.&quot;+l.dimClass
 )?1:-1;s=s+r;if(s&lt;0){s=0}q.closest(&quot;.awaiting-mod&quot;)[0==s?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;count-0&quot;);updateCount(q,s);dashboardTotals()})};h=function(o,s){var u=a(o.target).attr(&quot;class&quot;),k,l,m,r,t,q,p=false;o.data._total=c.val()||0;o.data._per_page=e.val()||0;o.data._page=g.val()||0;o.data._url=document.location.href;o.data.comment_status=a('input[name=&quot;comment_status&quot;]',&quot;#comments-form&quot;).val();if(u.indexOf(&quot;:trash=1&quot;)!=-1){p=&quot;trash&quot;}else{if(u.indexOf(&quot;:spam=1&quot;)!=-1){p=&quot;spam&quot;}}if(p){k=u.replace(/.*?comment-([0-9]+).*/,&quot;$1&quot;);l=a(&quot;#comment-&quot;+k);note=a(&quot;#&quot;+p+&quot;-undo-holder&quot;).html();l.find(&quot;.check-column :checkbox&quot;).prop(&quot;checked&quot;,false);if(l.siblings(&quot;#replyrow&quot;).length&amp;&amp;commentReply.cid==k){commentReply.close()}if(l.is(&quot;tr&quot;)){m=l.children(&quot;:visible&quot;).length;q=a(&quot;.author st
 rong&quot;,l).text();r=a('&lt;tr id=&quot;undo-'+k+'&quot; class=&quot;undo un'+p+'&quot; style=&quot;display:none;&quot;&gt;&lt;td colspan=&quot;'+m+'&quot;&gt;'+note+&quot;&lt;/td&gt;&lt;/tr&gt;&quot;)}else{q=a(&quot;.comment-author&quot;,l).text();r=a('&lt;div id=&quot;undo-'+k+'&quot; style=&quot;display:none;&quot; class=&quot;undo un'+p+'&quot;&gt;'+note+&quot;&lt;/div&gt;&quot;)}l.before(r);a(&quot;strong&quot;,&quot;#undo-&quot;+k).text(q+&quot; &quot;);t=a(&quot;.undo a&quot;,&quot;#undo-&quot;+k);t.attr(&quot;href&quot;,&quot;comment.php?action=un&quot;+p+&quot;comment&amp;c=&quot;+k+&quot;&amp;_wpnonce=&quot;+o.data._ajax_nonce);t.attr(&quot;class&quot;,&quot;delete:the-comment-list:comment-&quot;+k+&quot;::un&quot;+p+&quot;=1 vim-z vim-destructive&quot;);a(&quot;.avatar&quot;,l).clone().prependTo(&quot;#undo-&quot;+k+&quot; .&quot;+p+&quot;-undo-inside&quot;);t.click(function(){s.wpList.del(this);a(&quot;#undo-&quot;+k).css({backgroundColor:&quot;#ceb&quot;}).fad
 eOut(350,function(){a(this).remove();a(&quot;#comment-&quot;+k).css(&quot;backgroundColor&quot;,&quot;&quot;).fadeIn(300,function(){a(this).show()})});return false})}return o};d=function(k,l,m){if(l&lt;j){return}if(m){j=l}c.val(k.toString());a(&quot;span.total-type-count&quot;).each(function(){updateCount(a(this),k)})};dashboardTotals=function(q){var p=a(&quot;#dashboard_right_now&quot;),l,o,m,k;q=q||0;if(isNaN(q)||!p.length){return}l=a(&quot;span.total-count&quot;,p);o=a(&quot;span.approved-count&quot;,p);m=getCount(l);m=m+q;k=m-getCount(a(&quot;span.pending-count&quot;,p))-getCount(a(&quot;span.spam-count&quot;,p));updateCount(l,m);updateCount(o,k)};getCount=function(k){var l=parseInt(k.html().replace(/[^0-9]+/g,&quot;&quot;),10);if(isNaN(l)){return 0}return l};updateCount=function(l,m){var k=&quot;&quot;;if(isNaN(m)){return}m=m&lt;1?&quot;0&quot;:m.toString();if(m.length&gt;3){while(m.length&gt;3){k=thousandsSeparator+m.substr(m.length-3)+k;m=m.substr(0,m.length-3)}m=m+k}
 l.html(m)};updatePending=function(k){a(&quot;span.pending-count&quot;).each(function(){var l=a(this);if(k&lt;0){k=0}l.closest(&quot;.awaiting-mod&quot;)[0==k?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;count-0&quot;);updateCount(l,k);dashboardTotals()})};i=function(k,n){var q,o,u=a(n.target).parent().is(&quot;span.untrash&quot;),m=a(n.target).parent().is(&quot;span.unspam&quot;),t,s,l,p=a(&quot;#&quot;+n.element).is(&quot;.unapproved&quot;);function v(r){if(a(n.target).parent().is(&quot;span.&quot;+r)){return 1}else{if(a(&quot;#&quot;+n.element).is(&quot;.&quot;+r)){return -1}}return 0}t=v(&quot;spam&quot;);s=v(&quot;trash&quot;);if(u){s=-1}if(m){t=-1}l=getCount(a(&quot;span.pending-count&quot;).eq(0));if(a(n.target).parent().is(&quot;span.unapprove&quot;)||((u||m)&amp;&amp;p)){l=l+1}else{if(p){l=l-1}}updatePending(l);a(&quot;span.spam-count&quot;).each(function(){var r=a(this),w=getCount(r)+t;updateCount(r,w)});a(&quot;span.trash-count&quot;).each(function(){var r=a
 (this),w=getCount(r)+s;updateCount(r,w)});if(a(&quot;#dashboard_right_now&quot;).length){o=s?-1*s:0;dashboardTotals(o)}else{q=c.val()?parseInt(c.val(),10):0;q=q-t-s;if(q&lt;0){q=0}if((&quot;object&quot;==typeof k)&amp;&amp;j&lt;n.parsed.responses[0].supplemental.time){total_items_i18n=n.parsed.responses[0].supplemental.total_items_i18n||&quot;&quot;;if(total_items_i18n){a(&quot;.displaying-num&quot;).text(total_items_i18n);a(&quot;.total-pages&quot;).text(n.parsed.responses[0].supplemental.total_pages_i18n);a(&quot;.tablenav-pages&quot;).find(&quot;.next-page, .last-page&quot;).toggleClass(&quot;disabled&quot;,n.parsed.responses[0].supplemental.total_pages==a(&quot;.current-page&quot;).val())}d(q,n.parsed.responses[0].supplemental.time,true)}else{d(q,k,false)}}if(!theExtraList||theExtraList.size()==0||theExtraList.children().size()==0||u||m){return}theList.get(0).wpList.add(theExtraList.children(&quot;:eq(0)&quot;).remove().clone());b()};b=function(n){var l=a.query.get(),k=a
 (&quot;.total-pages&quot;).text(),m=a('input[name=&quot;_per_page&quot;]',&quot;#comments-form&quot;).val();if(!l.paged){l.paged=1}if(l.paged&gt;k){return}if(n){theExtraList.empty();l.number=Math.min(8,m)}else{l.number=1;l.offset=Math.min(8,m)-1}l.no_placeholder=true;l.paged++;if(true===l.comment_type){l.comment_type=&quot;&quot;}l=a.extend(l,{action:&quot;fetch-list&quot;,list_args:list_args,_ajax_fetch_list_nonce:a(&quot;#_ajax_fetch_list_nonce&quot;).val()});a.ajax({url:ajaxurl,global:false,dataType:&quot;json&quot;,data:l,success:function(o){theExtraList.get(0).wpList.add(o.rows)}})};theExtraList=a(&quot;#the-extra-comment-list&quot;).wpList({alt:&quot;&quot;,delColor:&quot;none&quot;,addColor:&quot;none&quot;});theList=a(&quot;#the-comment-list&quot;).wpList({alt:&quot;&quot;,delBefore:h,dimAfter:f,delAfter:i,addColor:&quot;none&quot;}).bind(&quot;wpListDelEnd&quot;,function(l,k){var m=k.element.replace(/[^0-9]+/g,&quot;&quot;);if(k.target.className.indexOf(&quot;:trash
 =1&quot;)!=-1||k.target.className.indexOf(&quot;:spam=1&quot;)!=-1){a(&quot;#undo-&quot;+m).fadeIn(300,function(){a(this).show()})}})};commentReply={cid:&quot;&quot;,act:&quot;&quot;,init:function(){var b=a(&quot;#replyrow&quot;);a(&quot;a.cancel&quot;,b).click(function(){return commentReply.revert()});a(&quot;a.save&quot;,b).click(function(){return commentReply.send()});a(&quot;input#author, input#author-email, input#author-url&quot;,b).keypress(function(c){if(c.which==13){commentReply.send();c.preventDefault();return false}});a(&quot;#the-comment-list .column-comment &gt; p&quot;).dblclick(function(){commentReply.toggle(a(this).parent())});a(&quot;#doaction, #doaction2, #post-query-submit&quot;).click(function(c){if(a(&quot;#the-comment-list #replyrow&quot;).length&gt;0){commentReply.close()}});this.comments_listing=a('#comments-form &gt; input[name=&quot;comment_status&quot;]').val()||&quot;&quot;},addEvents:function(b){b.each(function(){a(this).find(&quot;.column-comment
  &gt; p&quot;).dblclick(function(){commentReply.toggle(a(this).parent())})})},toggle:function(b){if(a(b).css(&quot;display&quot;)!=&quot;none&quot;){a(b).find(&quot;a.vim-q&quot;).click()}},revert:function(){if(a(&quot;#the-comment-list #replyrow&quot;).length&lt;1){return false}a(&quot;#replyrow&quot;).fadeOut(&quot;fast&quot;,function(){commentReply.close()});return false},close:function(){var b;if(this.cid){b=a(&quot;#comment-&quot;+this.cid);if(this.act==&quot;edit-comment&quot;){b.fadeIn(300,function(){b.show()}).css(&quot;backgroundColor&quot;,&quot;&quot;)}a(&quot;#replyrow&quot;).hide();a(&quot;#com-reply&quot;).append(a(&quot;#replyrow&quot;));a(&quot;#replycontent&quot;).val(&quot;&quot;);a(&quot;input&quot;,&quot;#edithead&quot;).val(&quot;&quot;);a(&quot;.error&quot;,&quot;#replysubmit&quot;).html(&quot;&quot;).hide();a(&quot;.waiting&quot;,&quot;#replysubmit&quot;).hide();if(a.browser.msie){a(&quot;#replycontainer, #replycontent&quot;).css(&quot;height&quot;,&qu
 ot;120px&quot;)}else{a(&quot;#replycontainer&quot;).resizable(&quot;destroy&quot;).css(&quot;height&quot;,&quot;120px&quot;)}this.cid=&quot;&quot;}},open:function(b,d,k){var m=this,e,f,i,g,j=a(&quot;#comment-&quot;+b),l;m.close();m.cid=b;e=a(&quot;#replyrow&quot;);f=a(&quot;#inline-&quot;+b);i=m.act=(k==&quot;edit&quot;)?&quot;edit-comment&quot;:&quot;replyto-comment&quot;;a(&quot;#action&quot;,e).val(i);a(&quot;#comment_post_ID&quot;,e).val(d);a(&quot;#comment_ID&quot;,e).val(b);if(k==&quot;edit&quot;){a(&quot;#author&quot;,e).val(a(&quot;div.author&quot;,f).text());a(&quot;#author-email&quot;,e).val(a(&quot;div.author-email&quot;,f).text());a(&quot;#author-url&quot;,e).val(a(&quot;div.author-url&quot;,f).text());a(&quot;#status&quot;,e).val(a(&quot;div.comment_status&quot;,f).text());a(&quot;#replycontent&quot;,e).val(a(&quot;textarea.comment&quot;,f).val());a(&quot;#edithead, #savebtn&quot;,e).show();a(&quot;#replyhead, #replybtn&quot;,e).hide();g=j.height();if(g&gt;220){
 if(a.browser.msie){a(&quot;#replycontainer, #replycontent&quot;,e).height(g-105)}else{a(&quot;#replycontainer&quot;,e).height(g-105)}}j.after(e).fadeOut(&quot;fast&quot;,function(){a(&quot;#replyrow&quot;).fadeIn(300,function(){a(this).show()})})}else{l=a(&quot;#replybtn&quot;,e);a(&quot;#edithead, #savebtn&quot;,e).hide();a(&quot;#replyhead, #replybtn&quot;,e).show();j.after(e);if(j.hasClass(&quot;unapproved&quot;)){l.text(adminCommentsL10n.replyApprove)}else{l.text(adminCommentsL10n.reply)}a(&quot;#replyrow&quot;).fadeIn(300,function(){a(this).show()})}setTimeout(function(){var o,h,p,c,n;o=a(&quot;#replyrow&quot;).offset().top;h=o+a(&quot;#replyrow&quot;).height();p=window.pageYOffset||document.documentElement.scrollTop;c=document.documentElement.clientHeight||self.innerHeight||0;n=p+c;if(n-20&lt;h){window.scroll(0,h-c+35)}else{if(o-20&lt;p){window.scroll(0,o-35)}}a(&quot;#replycontent&quot;).focus().keyup(function(q){if(q.which==27){commentReply.revert()}})},600);return f
 alse},send:function(){var b={};a(&quot;#replysubmit .error&quot;).hide();a(&quot;#replysubmit .waiting&quot;).show();a(&quot;#replyrow input&quot;).not(&quot;:button&quot;).each(function(){b[a(this).attr(&quot;name&quot;)]=a(this).val()});b.content=a(&quot;#replycontent&quot;).val();b.id=b.comment_post_ID;b.comments_listing=this.comments_listing;b.p=a('[name=&quot;p&quot;]').val();if(a(&quot;#comment-&quot;+a(&quot;#comment_ID&quot;).val()).hasClass(&quot;unapproved&quot;)){b.approve_parent=1}a.ajax({type:&quot;POST&quot;,url:ajaxurl,data:b,success:function(c){commentReply.show(c)},error:function(c){commentReply.error(c)}});return false},show:function(d){var f=this,g,i,h,e,b;f.revert();if(typeof(d)==&quot;string&quot;){f.error({responseText:d});return false}g=wpAjax.parseAjaxResponse(d);if(g.errors){f.error({responseText:wpAjax.broken});return false}g=g.responses[0];i=g.data;h=&quot;#comment-&quot;+g.id;if(&quot;edit-comment&quot;==f.act){a(h).remove()}if(g.supplemental.pare
 nt_approved){b=a(&quot;#comment-&quot;+g.supplemental.parent_approved);updatePending(getCount(a(&quot;span.pending-count&quot;).eq(0))-1);if(this.comments_listing==&quot;moderated&quot;){b.animate({backgroundColor:&quot;#CCEEBB&quot;},400,function(){b.fadeOut()});return}}a(i).hide();a(&quot;#replyrow&quot;).after(i);h=a(h);f.addEvents(h);e=h.hasClass(&quot;unapproved&quot;)?&quot;#FFFFE0&quot;:h.closest(&quot;.widefat&quot;).css(&quot;backgroundColor&quot;);h.animate({backgroundColor:&quot;#CCEEBB&quot;},300).animate({backgroundColor:e},300,function(){if(b&amp;&amp;b.length){b.animate({backgroundColor:&quot;#CCEEBB&quot;},300).animate({backgroundColor:e},300).removeClass(&quot;unapproved&quot;).addClass(&quot;approved&quot;).find(&quot;div.comment_status&quot;).html(&quot;1&quot;)}})},error:function(b){var c=b.statusText;a(&quot;#replysubmit .waiting&quot;).hide();if(b.responseText){c=b.responseText.replace(/&lt;.[^&lt;&gt;]*?&gt;/g,&quot;&quot;)}if(c){a(&quot;#replysubmit .
 error&quot;).html(c).show()}}};a(document).ready(function(){var e,b,c,d;setCommentsList();commentReply.init();a(document).delegate(&quot;span.delete a.delete&quot;,&quot;click&quot;,function(){return false});if(typeof QTags!=&quot;undefined&quot;){quicktags({id:&quot;replycontent&quot;,buttons:&quot;strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close&quot;})}if(typeof a.table_hotkeys!=&quot;undefined&quot;){e=function(f){return function(){var h,g;h=&quot;next&quot;==f?&quot;first&quot;:&quot;last&quot;;g=a(&quot;.tablenav-pages .&quot;+f+&quot;-page:not(.disabled)&quot;);if(g.length){window.location=g[0].href.replace(/\&amp;hotkeys_highlight_(first|last)=1/g,&quot;&quot;)+&quot;&amp;hotkeys_highlight_&quot;+h+&quot;=1&quot;}}};b=function(g,f){window.location=a(&quot;span.edit a&quot;,f).attr(&quot;href&quot;)};c=function(){toggleWithKeyboard=true;a(&quot;input:checkbox&quot;,&quot;#cb&quot;).click().prop(&quot;checked&quot;,false);toggleWithKeyboard=false};d=function(
 f){return function(){var g=a('select[name=&quot;action&quot;]');a('option[value=&quot;'+f+'&quot;]',g).prop(&quot;selected&quot;,true);a(&quot;#doaction&quot;).click()}};a.table_hotkeys(a(&quot;table.widefat&quot;),[&quot;a&quot;,&quot;u&quot;,&quot;s&quot;,&quot;d&quot;,&quot;r&quot;,&quot;q&quot;,&quot;z&quot;,[&quot;e&quot;,b],[&quot;shift+x&quot;,c],[&quot;shift+a&quot;,d(&quot;approve&quot;)],[&quot;shift+s&quot;,d(&quot;spam&quot;)],[&quot;shift+d&quot;,d(&quot;delete&quot;)],[&quot;shift+t&quot;,d(&quot;trash&quot;)],[&quot;shift+z&quot;,d(&quot;untrash&quot;)],[&quot;shift+u&quot;,d(&quot;unapprove&quot;)]],{highlight_first:adminCommentsL10n.hotkeys_highlight_first,highlight_last:adminCommentsL10n.hotkeys_highlight_last,prev_page_link_cb:e(&quot;prev&quot;),next_page_link_cb:e(&quot;next&quot;)})}})})(jQuery);
</del><span class="cx">\ No newline at end of file
</span><ins>+var theList,theExtraList,toggleWithKeyboard=false,getCount,updateCount,updatePending,dashboardTotals;(function(a){setCommentsList=function(){var c,e,g,j=0,f,h,d,i,b;c=a('input[name=&quot;_total&quot;]',&quot;#comments-form&quot;);e=a('input[name=&quot;_per_page&quot;]',&quot;#comments-form&quot;);g=a('input[name=&quot;_page&quot;]',&quot;#comments-form&quot;);f=function(n,l){var p=a(&quot;#&quot;+l.element),k,o,m;k=a(&quot;#replyrow&quot;);o=a(&quot;#comment_ID&quot;,k).val();m=a(&quot;#replybtn&quot;,k);if(p.is(&quot;.unapproved&quot;)){if(l.data.id==o){m.text(adminCommentsL10n.replyApprove)}p.find(&quot;div.comment_status&quot;).html(&quot;0&quot;)}else{if(l.data.id==o){m.text(adminCommentsL10n.reply)}p.find(&quot;div.comment_status&quot;).html(&quot;1&quot;)}a(&quot;span.pending-count&quot;).each(function(){var q=a(this),s,r;s=q.html().replace(/[^0-9]+/g,&quot;&quot;);s=parseInt(s,10);if(isNaN(s)){return}r=a(&quot;#&quot;+l.element).is(&quot;.&quot;+l.dimClass
 )?1:-1;s=s+r;if(s&lt;0){s=0}q.closest(&quot;.awaiting-mod&quot;)[0==s?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;count-0&quot;);updateCount(q,s);dashboardTotals()})};h=function(o,s){var u=a(o.target).attr(&quot;class&quot;),k,l,m,r,t,q,p=false;o.data._total=c.val()||0;o.data._per_page=e.val()||0;o.data._page=g.val()||0;o.data._url=document.location.href;o.data.comment_status=a('input[name=&quot;comment_status&quot;]',&quot;#comments-form&quot;).val();if(u.indexOf(&quot;:trash=1&quot;)!=-1){p=&quot;trash&quot;}else{if(u.indexOf(&quot;:spam=1&quot;)!=-1){p=&quot;spam&quot;}}if(p){k=u.replace(/.*?comment-([0-9]+).*/,&quot;$1&quot;);l=a(&quot;#comment-&quot;+k);note=a(&quot;#&quot;+p+&quot;-undo-holder&quot;).html();l.find(&quot;.check-column :checkbox&quot;).prop(&quot;checked&quot;,false);if(l.siblings(&quot;#replyrow&quot;).length&amp;&amp;commentReply.cid==k){commentReply.close()}if(l.is(&quot;tr&quot;)){m=l.children(&quot;:visible&quot;).length;q=a(&quot;.author st
 rong&quot;,l).text();r=a('&lt;tr id=&quot;undo-'+k+'&quot; class=&quot;undo un'+p+'&quot; style=&quot;display:none;&quot;&gt;&lt;td colspan=&quot;'+m+'&quot;&gt;'+note+&quot;&lt;/td&gt;&lt;/tr&gt;&quot;)}else{q=a(&quot;.comment-author&quot;,l).text();r=a('&lt;div id=&quot;undo-'+k+'&quot; style=&quot;display:none;&quot; class=&quot;undo un'+p+'&quot;&gt;'+note+&quot;&lt;/div&gt;&quot;)}l.before(r);a(&quot;strong&quot;,&quot;#undo-&quot;+k).text(q+&quot; &quot;);t=a(&quot;.undo a&quot;,&quot;#undo-&quot;+k);t.attr(&quot;href&quot;,&quot;comment.php?action=un&quot;+p+&quot;comment&amp;c=&quot;+k+&quot;&amp;_wpnonce=&quot;+o.data._ajax_nonce);t.attr(&quot;class&quot;,&quot;delete:the-comment-list:comment-&quot;+k+&quot;::un&quot;+p+&quot;=1 vim-z vim-destructive&quot;);a(&quot;.avatar&quot;,l).clone().prependTo(&quot;#undo-&quot;+k+&quot; .&quot;+p+&quot;-undo-inside&quot;);t.click(function(){s.wpList.del(this);a(&quot;#undo-&quot;+k).css({backgroundColor:&quot;#ceb&quot;}).fad
 eOut(350,function(){a(this).remove();a(&quot;#comment-&quot;+k).css(&quot;backgroundColor&quot;,&quot;&quot;).fadeIn(300,function(){a(this).show()})});return false})}return o};d=function(k,l,m){if(l&lt;j){return}if(m){j=l}c.val(k.toString());a(&quot;span.total-type-count&quot;).each(function(){updateCount(a(this),k)})};dashboardTotals=function(q){var p=a(&quot;#dashboard_right_now&quot;),l,o,m,k;q=q||0;if(isNaN(q)||!p.length){return}l=a(&quot;span.total-count&quot;,p);o=a(&quot;span.approved-count&quot;,p);m=getCount(l);m=m+q;k=m-getCount(a(&quot;span.pending-count&quot;,p))-getCount(a(&quot;span.spam-count&quot;,p));updateCount(l,m);updateCount(o,k)};getCount=function(k){var l=parseInt(k.html().replace(/[^0-9]+/g,&quot;&quot;),10);if(isNaN(l)){return 0}return l};updateCount=function(l,m){var k=&quot;&quot;;if(isNaN(m)){return}m=m&lt;1?&quot;0&quot;:m.toString();if(m.length&gt;3){while(m.length&gt;3){k=thousandsSeparator+m.substr(m.length-3)+k;m=m.substr(0,m.length-3)}m=m+k}
 l.html(m)};updatePending=function(k){a(&quot;span.pending-count&quot;).each(function(){var l=a(this);if(k&lt;0){k=0}l.closest(&quot;.awaiting-mod&quot;)[0==k?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;count-0&quot;);updateCount(l,k);dashboardTotals()})};i=function(k,n){var q,o,u=a(n.target).parent().is(&quot;span.untrash&quot;),m=a(n.target).parent().is(&quot;span.unspam&quot;),t,s,l,p=a(&quot;#&quot;+n.element).is(&quot;.unapproved&quot;);function v(r){if(a(n.target).parent().is(&quot;span.&quot;+r)){return 1}else{if(a(&quot;#&quot;+n.element).is(&quot;.&quot;+r)){return -1}}return 0}t=v(&quot;spam&quot;);s=v(&quot;trash&quot;);if(u){s=-1}if(m){t=-1}l=getCount(a(&quot;span.pending-count&quot;).eq(0));if(a(n.target).parent().is(&quot;span.unapprove&quot;)||((u||m)&amp;&amp;p)){l=l+1}else{if(p){l=l-1}}updatePending(l);a(&quot;span.spam-count&quot;).each(function(){var r=a(this),w=getCount(r)+t;updateCount(r,w)});a(&quot;span.trash-count&quot;).each(function(){var r=a
 (this),w=getCount(r)+s;updateCount(r,w)});if(a(&quot;#dashboard_right_now&quot;).length){o=s?-1*s:0;dashboardTotals(o)}else{q=c.val()?parseInt(c.val(),10):0;q=q-t-s;if(q&lt;0){q=0}if((&quot;object&quot;==typeof k)&amp;&amp;j&lt;n.parsed.responses[0].supplemental.time){total_items_i18n=n.parsed.responses[0].supplemental.total_items_i18n||&quot;&quot;;if(total_items_i18n){a(&quot;.displaying-num&quot;).text(total_items_i18n);a(&quot;.total-pages&quot;).text(n.parsed.responses[0].supplemental.total_pages_i18n);a(&quot;.tablenav-pages&quot;).find(&quot;.next-page, .last-page&quot;).toggleClass(&quot;disabled&quot;,n.parsed.responses[0].supplemental.total_pages==a(&quot;.current-page&quot;).val())}d(q,n.parsed.responses[0].supplemental.time,true)}else{d(q,k,false)}}if(!theExtraList||theExtraList.size()==0||theExtraList.children().size()==0||u||m){return}theList.get(0).wpList.add(theExtraList.children(&quot;:eq(0)&quot;).remove().clone());b()};b=function(n){var l=a.query.get(),k=a
 (&quot;.total-pages&quot;).text(),m=a('input[name=&quot;_per_page&quot;]',&quot;#comments-form&quot;).val();if(!l.paged){l.paged=1}if(l.paged&gt;k){return}if(n){theExtraList.empty();l.number=Math.min(8,m)}else{l.number=1;l.offset=Math.min(8,m)-1}l.no_placeholder=true;l.paged++;if(true===l.comment_type){l.comment_type=&quot;&quot;}l=a.extend(l,{action:&quot;fetch-list&quot;,list_args:list_args,_ajax_fetch_list_nonce:a(&quot;#_ajax_fetch_list_nonce&quot;).val()});a.ajax({url:ajaxurl,global:false,dataType:&quot;json&quot;,data:l,success:function(o){theExtraList.get(0).wpList.add(o.rows)}})};theExtraList=a(&quot;#the-extra-comment-list&quot;).wpList({alt:&quot;&quot;,delColor:&quot;none&quot;,addColor:&quot;none&quot;});theList=a(&quot;#the-comment-list&quot;).wpList({alt:&quot;&quot;,delBefore:h,dimAfter:f,delAfter:i,addColor:&quot;none&quot;}).bind(&quot;wpListDelEnd&quot;,function(l,k){var m=k.element.replace(/[^0-9]+/g,&quot;&quot;);if(k.target.className.indexOf(&quot;:trash
 =1&quot;)!=-1||k.target.className.indexOf(&quot;:spam=1&quot;)!=-1){a(&quot;#undo-&quot;+m).fadeIn(300,function(){a(this).show()})}})};commentReply={cid:&quot;&quot;,act:&quot;&quot;,init:function(){var b=a(&quot;#replyrow&quot;);a(&quot;a.cancel&quot;,b).click(function(){return commentReply.revert()});a(&quot;a.save&quot;,b).click(function(){return commentReply.send()});a(&quot;input#author, input#author-email, input#author-url&quot;,b).keypress(function(c){if(c.which==13){commentReply.send();c.preventDefault();return false}});a(&quot;#the-comment-list .column-comment &gt; p&quot;).dblclick(function(){commentReply.toggle(a(this).parent())});a(&quot;#doaction, #doaction2, #post-query-submit&quot;).click(function(c){if(a(&quot;#the-comment-list #replyrow&quot;).length&gt;0){commentReply.close()}});this.comments_listing=a('#comments-form &gt; input[name=&quot;comment_status&quot;]').val()||&quot;&quot;},addEvents:function(b){b.each(function(){a(this).find(&quot;.column-comment
  &gt; p&quot;).dblclick(function(){commentReply.toggle(a(this).parent())})})},toggle:function(b){if(a(b).css(&quot;display&quot;)!=&quot;none&quot;){a(b).find(&quot;a.vim-q&quot;).click()}},revert:function(){if(a(&quot;#the-comment-list #replyrow&quot;).length&lt;1){return false}a(&quot;#replyrow&quot;).fadeOut(&quot;fast&quot;,function(){commentReply.close()});return false},close:function(){var b;if(this.cid){b=a(&quot;#comment-&quot;+this.cid);if(typeof QTags!=&quot;undefined&quot;){QTags.closeAllTags(&quot;replycontent&quot;)}if(this.act==&quot;edit-comment&quot;){b.fadeIn(300,function(){b.show()}).css(&quot;backgroundColor&quot;,&quot;&quot;)}a(&quot;#replyrow&quot;).hide();a(&quot;#com-reply&quot;).append(a(&quot;#replyrow&quot;));a(&quot;#replycontent&quot;).val(&quot;&quot;);a(&quot;input&quot;,&quot;#edithead&quot;).val(&quot;&quot;);a(&quot;.error&quot;,&quot;#replysubmit&quot;).html(&quot;&quot;).hide();a(&quot;.waiting&quot;,&quot;#replysubmit&quot;).hide();a(&quo
 t;#replycontainer, #replycontent&quot;).height(120);this.cid=&quot;&quot;}},open:function(b,d,k){var m=this,e,f,i,j=a(&quot;#comment-&quot;+b),g=j.height(),l;m.close();m.cid=b;e=a(&quot;#replyrow&quot;);f=a(&quot;#inline-&quot;+b);i=m.act=(k==&quot;edit&quot;)?&quot;edit-comment&quot;:&quot;replyto-comment&quot;;a(&quot;#action&quot;,e).val(i);a(&quot;#comment_post_ID&quot;,e).val(d);a(&quot;#comment_ID&quot;,e).val(b);if(g&gt;220){a(&quot;#replycontainer, #replycontent&quot;,e).height(g-104)}if(k==&quot;edit&quot;){a(&quot;#author&quot;,e).val(a(&quot;div.author&quot;,f).text());a(&quot;#author-email&quot;,e).val(a(&quot;div.author-email&quot;,f).text());a(&quot;#author-url&quot;,e).val(a(&quot;div.author-url&quot;,f).text());a(&quot;#status&quot;,e).val(a(&quot;div.comment_status&quot;,f).text());a(&quot;#replycontent&quot;,e).val(a(&quot;textarea.comment&quot;,f).val());a(&quot;#edithead, #savebtn&quot;,e).show();a(&quot;#replyhead, #replybtn&quot;,e).hide();j.after(e).fa
 deOut(&quot;fast&quot;,function(){a(&quot;#replyrow&quot;).fadeIn(300,function(){a(this).show()})})}else{l=a(&quot;#replybtn&quot;,e);a(&quot;#edithead, #savebtn&quot;,e).hide();a(&quot;#replyhead, #replybtn&quot;,e).show();j.after(e);if(j.hasClass(&quot;unapproved&quot;)){l.text(adminCommentsL10n.replyApprove)}else{l.text(adminCommentsL10n.reply)}a(&quot;#replyrow&quot;).fadeIn(300,function(){a(this).show()})}setTimeout(function(){var o,h,p,c,n;o=a(&quot;#replyrow&quot;).offset().top;h=o+a(&quot;#replyrow&quot;).height();p=window.pageYOffset||document.documentElement.scrollTop;c=document.documentElement.clientHeight||self.innerHeight||0;n=p+c;if(n-20&lt;h){window.scroll(0,h-c+35)}else{if(o-20&lt;p){window.scroll(0,o-35)}}a(&quot;#replycontent&quot;).focus().keyup(function(q){if(q.which==27){commentReply.revert()}})},600);return false},send:function(){var b={};a(&quot;#replysubmit .error&quot;).hide();a(&quot;#replysubmit .waiting&quot;).show();a(&quot;#replyrow input&quot;)
 .not(&quot;:button&quot;).each(function(){b[a(this).attr(&quot;name&quot;)]=a(this).val()});b.content=a(&quot;#replycontent&quot;).val();b.id=b.comment_post_ID;b.comments_listing=this.comments_listing;b.p=a('[name=&quot;p&quot;]').val();if(a(&quot;#comment-&quot;+a(&quot;#comment_ID&quot;).val()).hasClass(&quot;unapproved&quot;)){b.approve_parent=1}a.ajax({type:&quot;POST&quot;,url:ajaxurl,data:b,success:function(c){commentReply.show(c)},error:function(c){commentReply.error(c)}});return false},show:function(d){var f=this,g,i,h,e,b;f.revert();if(typeof(d)==&quot;string&quot;){f.error({responseText:d});return false}g=wpAjax.parseAjaxResponse(d);if(g.errors){f.error({responseText:wpAjax.broken});return false}g=g.responses[0];i=g.data;h=&quot;#comment-&quot;+g.id;if(&quot;edit-comment&quot;==f.act){a(h).remove()}if(g.supplemental.parent_approved){b=a(&quot;#comment-&quot;+g.supplemental.parent_approved);updatePending(getCount(a(&quot;span.pending-count&quot;).eq(0))-1);if(this.c
 omments_listing==&quot;moderated&quot;){b.animate({backgroundColor:&quot;#CCEEBB&quot;},400,function(){b.fadeOut()});return}}a(i).hide();a(&quot;#replyrow&quot;).after(i);h=a(h);f.addEvents(h);e=h.hasClass(&quot;unapproved&quot;)?&quot;#FFFFE0&quot;:h.closest(&quot;.widefat&quot;).css(&quot;backgroundColor&quot;);h.animate({backgroundColor:&quot;#CCEEBB&quot;},300).animate({backgroundColor:e},300,function(){if(b&amp;&amp;b.length){b.animate({backgroundColor:&quot;#CCEEBB&quot;},300).animate({backgroundColor:e},300).removeClass(&quot;unapproved&quot;).addClass(&quot;approved&quot;).find(&quot;div.comment_status&quot;).html(&quot;1&quot;)}})},error:function(b){var c=b.statusText;a(&quot;#replysubmit .waiting&quot;).hide();if(b.responseText){c=b.responseText.replace(/&lt;.[^&lt;&gt;]*?&gt;/g,&quot;&quot;)}if(c){a(&quot;#replysubmit .error&quot;).html(c).show()}}};a(document).ready(function(){var e,b,c,d;setCommentsList();commentReply.init();a(document).delegate(&quot;span.delet
 e a.delete&quot;,&quot;click&quot;,function(){return false});if(typeof QTags!=&quot;undefined&quot;){quicktags({id:&quot;replycontent&quot;,buttons:&quot;strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close&quot;})}if(typeof a.table_hotkeys!=&quot;undefined&quot;){e=function(f){return function(){var h,g;h=&quot;next&quot;==f?&quot;first&quot;:&quot;last&quot;;g=a(&quot;.tablenav-pages .&quot;+f+&quot;-page:not(.disabled)&quot;);if(g.length){window.location=g[0].href.replace(/\&amp;hotkeys_highlight_(first|last)=1/g,&quot;&quot;)+&quot;&amp;hotkeys_highlight_&quot;+h+&quot;=1&quot;}}};b=function(g,f){window.location=a(&quot;span.edit a&quot;,f).attr(&quot;href&quot;)};c=function(){toggleWithKeyboard=true;a(&quot;input:checkbox&quot;,&quot;#cb&quot;).click().prop(&quot;checked&quot;,false);toggleWithKeyboard=false};d=function(f){return function(){var g=a('select[name=&quot;action&quot;]');a('option[value=&quot;'+f+'&quot;]',g).prop(&quot;selected&quot;,true);a(&quot;#doa
 ction&quot;).click()}};a.table_hotkeys(a(&quot;table.widefat&quot;),[&quot;a&quot;,&quot;u&quot;,&quot;s&quot;,&quot;d&quot;,&quot;r&quot;,&quot;q&quot;,&quot;z&quot;,[&quot;e&quot;,b],[&quot;shift+x&quot;,c],[&quot;shift+a&quot;,d(&quot;approve&quot;)],[&quot;shift+s&quot;,d(&quot;spam&quot;)],[&quot;shift+d&quot;,d(&quot;delete&quot;)],[&quot;shift+t&quot;,d(&quot;trash&quot;)],[&quot;shift+z&quot;,d(&quot;untrash&quot;)],[&quot;shift+u&quot;,d(&quot;unapprove&quot;)]],{highlight_first:adminCommentsL10n.hotkeys_highlight_first,highlight_last:adminCommentsL10n.hotkeys_highlight_last,prev_page_link_cb:e(&quot;prev&quot;),next_page_link_cb:e(&quot;next&quot;)})}})})(jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjseditordevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/editor.dev.js (18575 => 18576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/editor.dev.js        2011-08-19 21:23:31 UTC (rev 18575)
+++ trunk/wp-admin/js/editor.dev.js        2011-08-20 19:55:51 UTC (rev 18576)
</span><span class="lines">@@ -9,6 +9,9 @@
</span><span class="cx">                         if ( ed &amp;&amp; ! ed.isHidden() )
</span><span class="cx">                                 return false;
</span><span class="cx"> 
</span><ins>+                        if ( typeof(QTags) != 'undefined' )
+                                QTags.closeAllTags(id);
+
</ins><span class="cx">                         if ( tinyMCEPreInit.mceInit[id] &amp;&amp; tinyMCEPreInit.mceInit[id].wpautop )
</span><span class="cx">                                 txtarea_el.value = t.wpautop( txtarea_el.value );
</span><span class="cx">                         
</span></span></pre></div>
<a id="trunkwpadminjseditorjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/editor.js (18575 => 18576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/editor.js        2011-08-19 21:23:31 UTC (rev 18575)
+++ trunk/wp-admin/js/editor.js        2011-08-20 19:55:51 UTC (rev 18576)
</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(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.repl
 ace(/&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.repla
 ce(/^\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&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(&q
 uot;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={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}};
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjsquicktagsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/quicktags.dev.js (18575 => 18576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/quicktags.dev.js        2011-08-19 21:23:31 UTC (rev 18575)
+++ trunk/wp-includes/js/quicktags.dev.js        2011-08-20 19:55:51 UTC (rev 18576)
</span><span class="lines">@@ -152,6 +152,7 @@
</span><span class="cx"> 
</span><span class="cx">                 t.name = name;
</span><span class="cx">                 t.id = id;
</span><ins>+                t.canvas = canvas;
</ins><span class="cx"> 
</span><span class="cx">                 // default buttons
</span><span class="cx">                 for ( i in edButtons ) {
</span><span class="lines">@@ -161,8 +162,14 @@
</span><span class="cx">                         buttons[edButtons[i].id] = edButtons[i];
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                if ( id == 'content' &amp;&amp; adminpage &amp;&amp; ( adminpage == 'post-new-php' || adminpage == 'post-php' ) )
</del><ins>+                if ( id == 'content' &amp;&amp; adminpage &amp;&amp; ( adminpage == 'post-new-php' || adminpage == 'post-php' ) ) {
</ins><span class="cx">                         buttons['fullscreen'] = new qt.FullscreenButton();
</span><ins>+                        // back compat hack :-(
+                        edCanvas = canvas;
+                        toolbar_id = 'ed_toolbar';
+                } else {
+                        toolbar_id = name + '_toolbar';
+                }
</ins><span class="cx"> 
</span><span class="cx">                 // add custom buttons
</span><span class="cx">                 for ( i in t._customButtons ) {
</span><span class="lines">@@ -194,13 +201,6 @@
</span><span class="cx">                 for ( i in theButtons )
</span><span class="cx">                         html += theButtons[i].html(name + '_');
</span><span class="cx"> 
</span><del>-                if ( id == 'content' &amp;&amp; !qt.instances[0] ) { // back compat hack :-(
-                        edCanvas = canvas;
-                        toolbar_id = 'ed_toolbar';
-                } else {
-                        toolbar_id = name + '_toolbar';
-                }
-
</del><span class="cx">                 tb = document.createElement('div');
</span><span class="cx">                 tb.id = toolbar_id;
</span><span class="cx">                 tb.className = 'quicktags-toolbar';
</span><span class="lines">@@ -236,10 +236,10 @@
</span><span class="cx">                         return buttons[id];
</span><span class="cx">                 };
</span><span class="cx"> 
</span><del>-                if ( !qt.instances[0] )
-                        qt.instances[0] = t;
-
</del><span class="cx">                 qt.instances[id] = t;
</span><ins>+
+                if ( !qt.instances[0] )
+                        qt.instances[0] = qt.instances[id];
</ins><span class="cx">         };
</span><span class="cx"> 
</span><span class="cx">         qt.instances = {};
</span><span class="lines">@@ -304,31 +304,31 @@
</span><span class="cx">         };
</span><span class="cx"> 
</span><span class="cx">         qt.insertContent = function(content) {
</span><del>-                var sel, startPos, endPos, scrollTop, text, ed = document.getElementById(wpActiveEditor);
</del><ins>+                var sel, startPos, endPos, scrollTop, text, canvas = document.getElementById(wpActiveEditor);
</ins><span class="cx"> 
</span><del>-                if ( !ed )
</del><ins>+                if ( !canvas )
</ins><span class="cx">                         return false;
</span><span class="cx"> 
</span><span class="cx">                 if ( document.selection ) { //IE
</span><del>-                        ed.focus();
</del><ins>+                        canvas.focus();
</ins><span class="cx">                         sel = document.selection.createRange();
</span><span class="cx">                         sel.text = content;
</span><del>-                        ed.focus();
-                } else if ( ed.selectionStart || ed.selectionStart == '0' ) { // all other
-                        text = ed.value;
-                        startPos = ed.selectionStart;
-                        endPos = ed.selectionEnd;
-                        scrollTop = ed.scrollTop;
</del><ins>+                        canvas.focus();
+                } else if ( canvas.selectionStart || canvas.selectionStart == '0' ) { // FF, WebKit, Opera
+                        text = canvas.value;
+                        startPos = canvas.selectionStart;
+                        endPos = canvas.selectionEnd;
+                        scrollTop = canvas.scrollTop;
</ins><span class="cx"> 
</span><del>-                        ed.value = text.substring(0, startPos) + content + text.substring(endPos, text.length);
</del><ins>+                        canvas.value = text.substring(0, startPos) + content + text.substring(endPos, text.length);
</ins><span class="cx"> 
</span><del>-                        ed.focus();
-                        ed.selectionStart = startPos + content.length;
-                        ed.selectionEnd = startPos + content.length;
-                        ed.scrollTop = scrollTop;
</del><ins>+                        canvas.focus();
+                        canvas.selectionStart = startPos + content.length;
+                        canvas.selectionEnd = startPos + content.length;
+                        canvas.scrollTop = scrollTop;
</ins><span class="cx">                 } else {
</span><del>-                        ed.value += content;
-                        ed.focus();
</del><ins>+                        canvas.value += content;
+                        canvas.focus();
</ins><span class="cx">                 }
</span><span class="cx">                 return true;
</span><span class="cx">         };
</span><span class="lines">@@ -356,32 +356,32 @@
</span><span class="cx">                 t.open = open;
</span><span class="cx">         };
</span><span class="cx">         qt.TagButton.prototype = new qt.Button();
</span><del>-        qt.TagButton.prototype.openTag = function(e, tb) {
</del><ins>+        qt.TagButton.prototype.openTag = function(e, ed) {
</ins><span class="cx">                 var t = this;
</span><del>-                if ( ! tb.openTags ) {
-                        tb.openTags = [];
</del><ins>+
+                if ( ! ed.openTags ) {
+                        ed.openTags = [];
</ins><span class="cx">                 }
</span><span class="cx">                 if ( t.tagEnd ) {
</span><del>-                        tb.openTags.push(t.id);
</del><ins>+                        ed.openTags.push(t.id);
</ins><span class="cx">                         e.value = '/' + e.value;
</span><span class="cx">                 }
</span><span class="cx">         };
</span><del>-        qt.TagButton.prototype.closeTag = function(e, tb) {
-                var t = this,
-                        i = t.isOpen(tb);
</del><ins>+        qt.TagButton.prototype.closeTag = function(e, ed) {
+                var t = this, i = t.isOpen(ed);
</ins><span class="cx"> 
</span><span class="cx">                 if ( i !== false ) {
</span><del>-                        tb.openTags.splice(i, 1);
</del><ins>+                        ed.openTags.splice(i, 1);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 e.value = t.display;
</span><span class="cx">         };
</span><span class="cx">         // whether a tag is open or not. Returns false if not open, or current open depth of the tag
</span><del>-        qt.TagButton.prototype.isOpen = function (tb) {
</del><ins>+        qt.TagButton.prototype.isOpen = function (ed) {
</ins><span class="cx">                 var t = this, i = 0, ret = false;
</span><del>-                if ( tb.openTags ) {
-                        while ( ret === false &amp;&amp; i &lt; tb.openTags.length ) {
-                                ret = tb.openTags[i] == t.id ? i : false;
</del><ins>+                if ( ed.openTags ) {
+                        while ( ret === false &amp;&amp; i &lt; ed.openTags.length ) {
+                                ret = ed.openTags[i] == t.id ? i : false;
</ins><span class="cx">                                 i ++;
</span><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="lines">@@ -389,30 +389,25 @@
</span><span class="cx">                 }
</span><span class="cx">                 return ret;
</span><span class="cx">         };
</span><del>-        qt.TagButton.prototype.callback = function(element, canvas, toolbar) {
-                var t = this, startPos, endPos, cursorPos, scrollTop, v, l, r, i, sel;
</del><ins>+        qt.TagButton.prototype.callback = function(element, canvas, ed) {
+                var t = this, startPos, endPos, cursorPos, scrollTop, v = canvas.value, l, r, i, sel, endTag = v ? t.tagEnd : '';
</ins><span class="cx"> 
</span><del>-                v = canvas.value;
-
-                // IE support
-                if ( document.selection ) {
</del><ins>+                if ( document.selection ) { // IE
</ins><span class="cx">                         canvas.focus();
</span><span class="cx">                         sel = document.selection.createRange();
</span><span class="cx">                         if ( sel.text.length &gt; 0 ) {
</span><del>-                                sel.text = t.tagStart + sel.text + t.tagEnd;
</del><ins>+                                sel.text = t.tagStart + sel.text + endTag;
</ins><span class="cx">                         } else {
</span><del>-                                if ( t.isOpen(toolbar) === false || t.tagEnd === '' ) {
</del><ins>+                                if ( t.isOpen(ed) === false || t.tagEnd === '' ) {
</ins><span class="cx">                                         sel.text = t.tagStart;
</span><del>-                                        t.openTag(element, toolbar);
</del><ins>+                                        t.openTag(element, ed);
</ins><span class="cx">                                 } else {
</span><del>-                                        sel.text = t.tagEnd;
-                                        t.closeTag(element, toolbar);
</del><ins>+                                        sel.text = endTag;
+                                        t.closeTag(element, ed);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                         canvas.focus();
</span><del>-                }
-                // moz, webkit, opera
-                else if ( canvas.selectionStart || canvas.selectionStart == '0' ) {
</del><ins>+                } else if ( canvas.selectionStart || canvas.selectionStart == '0' ) { // FF, WebKit, Opera
</ins><span class="cx">                         startPos = canvas.selectionStart;
</span><span class="cx">                         endPos = canvas.selectionEnd;
</span><span class="cx">                         cursorPos = endPos;
</span><span class="lines">@@ -421,20 +416,20 @@
</span><span class="cx">                         r = v.substring(endPos, v.length); // right of the selection
</span><span class="cx">                         i = v.substring(startPos, endPos); // inside the selection
</span><span class="cx">                         if ( startPos != endPos ) {
</span><del>-                                canvas.value = l + t.tagStart + i + t.tagEnd + r;
-                                if ( t.tagEnd === '' ) {
</del><ins>+                                canvas.value = l + t.tagStart + i + endTag + r;
+                                if ( endTag === '' ) {
</ins><span class="cx">                                         cursorPos = startPos;
</span><span class="cx">                                 }
</span><del>-                                cursorPos += t.tagStart.length + t.tagEnd.length;
</del><ins>+                                cursorPos += t.tagStart.length + endTag.length;
</ins><span class="cx">                         } else {
</span><del>-                                if ( t.isOpen(toolbar) === false || t.tagEnd === '' ) {
</del><ins>+                                if ( t.isOpen(ed) === false || t.tagEnd === '' ) {
</ins><span class="cx">                                         canvas.value = l + t.tagStart + r;
</span><del>-                                        t.openTag(element, toolbar);
</del><ins>+                                        t.openTag(element, ed);
</ins><span class="cx">                                         cursorPos = startPos + t.tagStart.length;
</span><span class="cx">                                 } else {
</span><del>-                                        canvas.value = l + t.tagEnd + r;
-                                        cursorPos = startPos + t.tagEnd.length;
-                                        t.closeTag(element, toolbar);
</del><ins>+                                        canvas.value = l + endTag + r;
+                                        cursorPos = startPos + endTag.length;
+                                        t.closeTag(element, ed);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="lines">@@ -445,12 +440,12 @@
</span><span class="cx">                 }
</span><span class="cx">                 // other browsers
</span><span class="cx">                 else {
</span><del>-                        if ( t.isOpen(toolbar) !== false || t.tagEnd === '' ) {
</del><ins>+                        if ( t.isOpen(ed) !== false || t.tagEnd === '' ) {
</ins><span class="cx">                                 canvas.value += t.tagStart;
</span><del>-                                t.openTag(element, toolbar);
</del><ins>+                                t.openTag(element, ed);
</ins><span class="cx">                         } else {
</span><del>-                                canvas.value += t.tagEnd;
-                                t.closeTag(element, toolbar);
</del><ins>+                                canvas.value += endTag;
+                                t.closeTag(element, ed);
</ins><span class="cx">                         }
</span><span class="cx">                         canvas.focus();
</span><span class="cx">                 }
</span><span class="lines">@@ -461,7 +456,7 @@
</span><span class="cx">                 qt.Button.call(this, 'spell', quicktagsL10n.lookup, '', quicktagsL10n.dictionaryLookup);
</span><span class="cx">         };
</span><span class="cx">         qt.SpellButton.prototype = new qt.Button();
</span><del>-        qt.SpellButton.prototype.callback = function(element, canvas, toolbar) {
</del><ins>+        qt.SpellButton.prototype.callback = function(element, canvas, ed) {
</ins><span class="cx">                 var word = '', sel, startPos, endPos;
</span><span class="cx"> 
</span><span class="cx">                 if ( document.selection ) {
</span><span class="lines">@@ -470,8 +465,7 @@
</span><span class="cx">                         if ( sel.text.length &gt; 0 ) {
</span><span class="cx">                                 word = sel.text;
</span><span class="cx">                         }
</span><del>-                }
-                else if ( canvas.selectionStart || canvas.selectionStart == '0' ) {
</del><ins>+                } else if ( canvas.selectionStart || canvas.selectionStart == '0' ) {
</ins><span class="cx">                         startPos = canvas.selectionStart;
</span><span class="cx">                         endPos = canvas.selectionEnd;
</span><span class="cx">                         if ( startPos != endPos ) {
</span><span class="lines">@@ -488,25 +482,26 @@
</span><span class="cx">                 }
</span><span class="cx">         };
</span><span class="cx"> 
</span><del>-        // the close button
</del><ins>+        // the close tags button
</ins><span class="cx">         qt.CloseButton = function() {
</span><span class="cx">                 qt.Button.call(this, 'close', quicktagsL10n.closeTags, '', quicktagsL10n.closeAllOpenTags);
</span><span class="cx">         };
</span><span class="cx">         qt.CloseButton.prototype = new qt.Button();
</span><del>-        qt.CloseButton.prototype.callback = function(e, c, tb) {
-                var button, element, tbo = tb.openTags;
</del><ins>+        qt.CloseButton.prototype.callback = function(e, c, ed) {
+                var button, element, tbo = ed.openTags;
+
</ins><span class="cx">                 if ( tbo ) {
</span><span class="cx">                         while ( tbo.length &gt; 0 ) {
</span><del>-                                button = tb.getButton(tbo[tbo.length - 1]);
-                                element = document.getElementById(tb.name + '_' + button.id);
-                                button.callback.call(button, element, c, tb);
</del><ins>+                                button = ed.getButton(tbo[tbo.length - 1]);
+                                element = document.getElementById(ed.name + '_' + button.id);
+                                button.callback.call(button, element, c, ed);
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         };
</span><span class="cx"> 
</span><del>-        qt.prototype.closeAllTags = function() {
-                var btn = this.getButton('close');
-                btn.callback.call(btn, '', this.canvas, this.toolbar);
</del><ins>+        qt.closeAllTags = function(editor_id) {
+                var ed = this.getInstance(editor_id), btn = ed.getButton('close');
+                btn.callback.call(btn, '', ed.canvas, ed);
</ins><span class="cx">         };
</span><span class="cx"> 
</span><span class="cx">         // the link button
</span><span class="lines">@@ -514,7 +509,7 @@
</span><span class="cx">                 qt.TagButton.call(this, 'link', 'link', '', '&lt;/a&gt;', 'a');
</span><span class="cx">         };
</span><span class="cx">         qt.LinkButton.prototype = new qt.TagButton();
</span><del>-        qt.LinkButton.prototype.callback = function(e, c, tb, defaultValue) {
</del><ins>+        qt.LinkButton.prototype.callback = function(e, c, ed, defaultValue) {
</ins><span class="cx">                 var URL, t = this;
</span><span class="cx"> 
</span><span class="cx">                 if ( typeof(wpLink) != 'undefined' ) {
</span><span class="lines">@@ -525,14 +520,14 @@
</span><span class="cx">                 if ( ! defaultValue )
</span><span class="cx">                         defaultValue = 'http://';
</span><span class="cx"> 
</span><del>-                if ( t.isOpen(tb) === false ) {
</del><ins>+                if ( t.isOpen(ed) === false ) {
</ins><span class="cx">                         URL = prompt(quicktagsL10n.enterURL, defaultValue);
</span><span class="cx">                         if ( URL ) {
</span><span class="cx">                                 t.tagStart = '&lt;a href=&quot;' + URL + '&quot;&gt;';
</span><del>-                                qt.TagButton.prototype.callback.call(t, e, c, tb);
</del><ins>+                                qt.TagButton.prototype.callback.call(t, e, c, ed);
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><del>-                        qt.TagButton.prototype.callback.call(t, e, c, tb);
</del><ins>+                        qt.TagButton.prototype.callback.call(t, e, c, ed);
</ins><span class="cx">                 }
</span><span class="cx">         };
</span><span class="cx"> 
</span><span class="lines">@@ -541,7 +536,7 @@
</span><span class="cx">                 qt.TagButton.call(this, 'img', 'img', '', '', 'm', -1);
</span><span class="cx">         };
</span><span class="cx">         qt.ImgButton.prototype = new qt.TagButton();
</span><del>-        qt.ImgButton.prototype.callback = function(e, c, tb, defaultValue) {
</del><ins>+        qt.ImgButton.prototype.callback = function(e, c, ed, defaultValue) {
</ins><span class="cx">                 if ( ! defaultValue ) {
</span><span class="cx">                         defaultValue = 'http://';
</span><span class="cx">                 }
</span><span class="lines">@@ -549,7 +544,7 @@
</span><span class="cx">                 if ( src ) {
</span><span class="cx">                         alt = prompt(quicktagsL10n.enterImageDescription, '');
</span><span class="cx">                         this.tagStart = '&lt;img src=&quot;' + src + '&quot; alt=&quot;' + alt + '&quot; /&gt;';
</span><del>-                        qt.TagButton.prototype.callback.call(this, e, c, tb);
</del><ins>+                        qt.TagButton.prototype.callback.call(this, e, c, ed);
</ins><span class="cx">                 }
</span><span class="cx">         };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludesjsquicktagsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/quicktags.js (18575 => 18576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/quicktags.js        2011-08-19 21:23:31 UTC (rev 18575)
+++ trunk/wp-includes/js/quicktags.js        2011-08-20 19:55:51 UTC (rev 18576)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var QTags,edButtons=[],edCanvas;function quicktags(a){return new QTags(a)}function edInsertContent(b,a){return QTags.insertContent(a)}function edButton(f,e,c,b,a,d){return QTags.addButton(f,e,c,b,d,a)}(function(){var c=function(h){var g,f,e;if(typeof jQuery!=&quot;undefined&quot;){jQuery(document).ready(h)}else{g=c;g.funcs=[];g.ready=function(){if(!g.isReady){g.isReady=true;for(f=0;f&lt;g.funcs.length;f++){g.funcs[f]()}}};if(g.isReady){h()}else{g.funcs.push(h)}if(!g.eventAttached){if(document.addEventListener){e=function(){document.removeEventListener(&quot;DOMContentLoaded&quot;,e,false);g.ready()};document.addEventListener(&quot;DOMContentLoaded&quot;,e,false);window.addEventListener(&quot;load&quot;,g.ready,false)}else{if(document.attachEvent){e=function(){if(document.readyState===&quot;complete&quot;){document.detachEvent(&quot;onreadystatechange&quot;,e);g.ready()}};document.attachEvent(&quot;onreadystatechange&quot;,e);window.attachEvent(&quot;onload&quot;,
 g.ready);(function(){try{document.documentElement.doScroll(&quot;left&quot;)}catch(i){setTimeout(arguments.callee,50);return}g.ready()})()}}g.eventAttached=true}}},a=(function(){var e=new Date(),f;f=function(g){var h=g.toString();if(h.length&lt;2){h=&quot;0&quot;+h}return h};return e.getUTCFullYear()+&quot;-&quot;+f(e.getUTCMonth()+1)+&quot;-&quot;+f(e.getUTCDate())+&quot;T&quot;+f(e.getUTCHours())+&quot;:&quot;+f(e.getUTCMinutes())+&quot;:&quot;+f(e.getUTCSeconds())+&quot;+00:00&quot;})(),b={},d;d=QTags=function(k){if(typeof(k)==&quot;string&quot;){k={id:k}}else{if(typeof(k)!=&quot;object&quot;){return false}}var s=this,g=k.id,q={},p={},j=document.getElementById(g),e=&quot;qt_&quot;+g,o=&quot;&quot;,n,l,m,h,r,f;if(!g||!j){return false}s.name=e;s.id=g;for(n in edButtons){if(!edButtons[n]){continue}q[edButtons[n].id]=edButtons[n]}if(g==&quot;content&quot;&amp;&amp;adminpage&amp;&amp;(adminpage==&quot;post-new-php&quot;||adminpage==&quot;post-php&quot;)){q.fullscreen=new d.Ful
 lscreenButton()}for(n in s._customButtons){q[n]=new s._customButtons[n]()}if(k.buttons){m=k.buttons.split(&quot;,&quot;);for(n in m){h=m[n];if(q[h]){p[h]=q[h]}}}else{p=q}if(k.disabled_buttons){m=k.disabled_buttons.split(&quot;,&quot;);for(n in m){h=m[n];if(p[h]){delete (p[h])}}}for(n in p){o+=p[n].html(e+&quot;_&quot;)}if(g==&quot;content&quot;&amp;&amp;!d.instances[0]){edCanvas=j;f=&quot;ed_toolbar&quot;}else{f=e+&quot;_toolbar&quot;}l=document.createElement(&quot;div&quot;);l.id=f;l.className=&quot;quicktags-toolbar&quot;;j.parentNode.insertBefore(l,j);l.innerHTML=o;s.toolbar=l;r=function(v){v=v||window.event;var u=v.target||v.srcElement,t;if(/\s+ed_button\s+/.test(&quot; &quot;+u.className+&quot; &quot;)){s.canvas=j=document.getElementById(g);t=u.id.replace(e+&quot;_&quot;,&quot;&quot;);if(p[t]){p[t].callback.call(p[t],u,j,s)}}};if(l.addEventListener){l.addEventListener(&quot;click&quot;,r,false)}else{if(l.attachEvent){l.attachEvent(&quot;onclick&quot;,r)}}s.getButton=fun
 ction(i){return q[i]};if(!d.instances[0]){d.instances[0]=s}d.instances[g]=s};d.instances={};d.registerButton=function(f,e){b[f]=e};d.getInstance=function(e){return d.instances[e]};d.addButton=function(e,k,j,i,h,g,l,m){var f;if(!e||!k){return}if(typeof(j)==&quot;function&quot;){f=new d.Button(e,k,g,l);f.callback=j}else{if(typeof(j)==&quot;string&quot;&amp;&amp;j&amp;&amp;i){f=new d.TagButton(e,k,j,i,g,h,l)}else{return}}if(m){while(typeof(edButtons[m])!=&quot;undefined&quot;){m++}edButtons[m]=f}else{edButtons[edButtons.length]=f}};d.insertContent=function(h){var i,g,f,j,k,e=document.getElementById(wpActiveEditor);if(!e){return false}if(document.selection){e.focus();i=document.selection.createRange();i.text=h;e.focus()}else{if(e.selectionStart||e.selectionStart==&quot;0&quot;){k=e.value;g=e.selectionStart;f=e.selectionEnd;j=e.scrollTop;e.value=k.substring(0,g)+h+k.substring(f,k.length);e.focus();e.selectionStart=g+h.length;e.selectionEnd=g+h.length;e.scrollTop=j}else{e.value+=h
 ;e.focus()}}return true};d.Button=function(i,g,e,h){var f=this;f.id=i;f.display=g;f.access=e;f.title=h||&quot;&quot;};d.Button.prototype.html=function(f){var e=this.access?' accesskey=&quot;'+this.access+'&quot;':&quot;&quot;;return'&lt;input type=&quot;button&quot; id=&quot;'+f+this.id+'&quot;'+e+' class=&quot;ed_button&quot; title=&quot;'+this.title+'&quot; value=&quot;'+this.display+'&quot; /&gt;'};d.Button.prototype.callback=function(){};d.TagButton=function(l,j,g,f,e,h,k){var i=this;d.Button.call(i,l,j,e,k);i.tagStart=g;i.tagEnd=f;i.open=h};d.TagButton.prototype=new d.Button();d.TagButton.prototype.openTag=function(h,f){var g=this;if(!f.openTags){f.openTags=[]}if(g.tagEnd){f.openTags.push(g.id);h.value=&quot;/&quot;+h.value}};d.TagButton.prototype.closeTag=function(j,f){var h=this,g=h.isOpen(f);if(g!==false){f.openTags.splice(g,1)}j.value=h.display};d.TagButton.prototype.isOpen=function(e){var h=this,g=0,f=false;if(e.openTags){while(f===false&amp;&amp;g&lt;e.openTags.le
 ngth){f=e.openTags[g]==h.id?g:false;g++}}else{f=false}return f};d.TagButton.prototype.callback=function(o,j,q){var u=this,p,f,m,h,s,k,e,n,g;s=j.value;if(document.selection){j.focus();g=document.selection.createRange();if(g.text.length&gt;0){g.text=u.tagStart+g.text+u.tagEnd}else{if(u.isOpen(q)===false||u.tagEnd===&quot;&quot;){g.text=u.tagStart;u.openTag(o,q)}else{g.text=u.tagEnd;u.closeTag(o,q)}}j.focus()}else{if(j.selectionStart||j.selectionStart==&quot;0&quot;){p=j.selectionStart;f=j.selectionEnd;m=f;h=j.scrollTop;k=s.substring(0,p);e=s.substring(f,s.length);n=s.substring(p,f);if(p!=f){j.value=k+u.tagStart+n+u.tagEnd+e;if(u.tagEnd===&quot;&quot;){m=p}m+=u.tagStart.length+u.tagEnd.length}else{if(u.isOpen(q)===false||u.tagEnd===&quot;&quot;){j.value=k+u.tagStart+e;u.openTag(o,q);m=p+u.tagStart.length}else{j.value=k+u.tagEnd+e;m=p+u.tagEnd.length;u.closeTag(o,q)}}j.focus();j.selectionStart=m;j.selectionEnd=m;j.scrollTop=h}else{if(u.isOpen(q)!==false||u.tagEnd===&quot;&quot;)
 {j.value+=u.tagStart;u.openTag(o,q)}else{j.value+=u.tagEnd;u.closeTag(o,q)}j.focus()}}};d.SpellButton=function(){d.Button.call(this,&quot;spell&quot;,quicktagsL10n.lookup,&quot;&quot;,quicktagsL10n.dictionaryLookup)};d.SpellButton.prototype=new d.Button();d.SpellButton.prototype.callback=function(h,g,i){var k=&quot;&quot;,j,f,e;if(document.selection){g.focus();j=document.selection.createRange();if(j.text.length&gt;0){k=j.text}}else{if(g.selectionStart||g.selectionStart==&quot;0&quot;){f=g.selectionStart;e=g.selectionEnd;if(f!=e){k=g.value.substring(f,e)}}}if(k===&quot;&quot;){k=prompt(quicktagsL10n.wordLookup,&quot;&quot;)}if(k!==null&amp;&amp;/^\w[\w ]*$/.test(k)){window.open(&quot;http://www.answers.com/&quot;+encodeURIComponent(k))}};d.CloseButton=function(){d.Button.call(this,&quot;close&quot;,quicktagsL10n.closeTags,&quot;&quot;,quicktagsL10n.closeAllOpenTags)};d.CloseButton.prototype=new d.Button();d.CloseButton.prototype.callback=function(j,k,f){var h,g,i=f.openTags;i
 f(i){while(i.length&gt;0){h=f.getButton(i[i.length-1]);g=document.getElementById(f.name+&quot;_&quot;+h.id);h.callback.call(h,g,k,f)}}};d.prototype.closeAllTags=function(){var e=this.getButton(&quot;close&quot;);e.callback.call(e,&quot;&quot;,this.canvas,this.toolbar)};d.LinkButton=function(){d.TagButton.call(this,&quot;link&quot;,&quot;link&quot;,&quot;&quot;,&quot;&lt;/a&gt;&quot;,&quot;a&quot;)};d.LinkButton.prototype=new d.TagButton();d.LinkButton.prototype.callback=function(j,k,h,g){var f,i=this;if(typeof(wpLink)!=&quot;undefined&quot;){wpLink.open();return}if(!g){g=&quot;http://&quot;}if(i.isOpen(h)===false){f=prompt(quicktagsL10n.enterURL,g);if(f){i.tagStart='&lt;a href=&quot;'+f+'&quot;&gt;';d.TagButton.prototype.callback.call(i,j,k,h)}}else{d.TagButton.prototype.callback.call(i,j,k,h)}};d.ImgButton=function(){d.TagButton.call(this,&quot;img&quot;,&quot;img&quot;,&quot;&quot;,&quot;&quot;,&quot;m&quot;,-1)};d.ImgButton.prototype=new d.TagButton();d.ImgButton.prototyp
 e.callback=function(i,k,g,f){if(!f){f=&quot;http://&quot;}var j=prompt(quicktagsL10n.enterImageURL,f),h;if(j){h=prompt(quicktagsL10n.enterImageDescription,&quot;&quot;);this.tagStart='&lt;img src=&quot;'+j+'&quot; alt=&quot;'+h+'&quot; /&gt;';d.TagButton.prototype.callback.call(this,i,k,g)}};d.FullscreenButton=function(){d.Button.call(this,&quot;fullscreen&quot;,quicktagsL10n.fullscreen,&quot;f&quot;,quicktagsL10n.toggleFullscreen)};d.FullscreenButton.prototype=new d.Button();d.FullscreenButton.prototype.callback=function(f,g){if(g.id!=&quot;content&quot;||typeof(fullscreen)==&quot;undefined&quot;){return}fullscreen.on()};edButtons[10]=new d.TagButton(&quot;strong&quot;,&quot;b&quot;,&quot;&lt;strong&gt;&quot;,&quot;&lt;/strong&gt;&quot;,&quot;b&quot;);edButtons[20]=new d.TagButton(&quot;em&quot;,&quot;i&quot;,&quot;&lt;em&gt;&quot;,&quot;&lt;/em&gt;&quot;,&quot;i&quot;),edButtons[30]=new d.LinkButton(),edButtons[40]=new d.TagButton(&quot;block&quot;,&quot;b-quote&quot;,&quo
 t;\n\n&lt;blockquote&gt;&quot;,&quot;&lt;/blockquote&gt;\n\n&quot;,&quot;q&quot;),edButtons[50]=new d.TagButton(&quot;del&quot;,&quot;del&quot;,'&lt;del datetime=&quot;'+a+'&quot;&gt;',&quot;&lt;/del&gt;&quot;,&quot;d&quot;),edButtons[60]=new d.TagButton(&quot;ins&quot;,&quot;ins&quot;,'&lt;ins datetime=&quot;'+a+'&quot;&gt;',&quot;&lt;/ins&gt;&quot;,&quot;s&quot;),edButtons[70]=new d.ImgButton(),edButtons[80]=new d.TagButton(&quot;ul&quot;,&quot;ul&quot;,&quot;&lt;ul&gt;\n&quot;,&quot;&lt;/ul&gt;\n\n&quot;,&quot;u&quot;),edButtons[90]=new d.TagButton(&quot;ol&quot;,&quot;ol&quot;,&quot;&lt;ol&gt;\n&quot;,&quot;&lt;/ol&gt;\n\n&quot;,&quot;o&quot;),edButtons[100]=new d.TagButton(&quot;li&quot;,&quot;li&quot;,&quot;\t&lt;li&gt;&quot;,&quot;&lt;/li&gt;\n&quot;,&quot;l&quot;),edButtons[110]=new d.TagButton(&quot;code&quot;,&quot;code&quot;,&quot;&lt;code&gt;&quot;,&quot;&lt;/code&gt;&quot;,&quot;c&quot;),edButtons[120]=new d.TagButton(&quot;more&quot;,&quot;more&quot;,&quot;&lt;
 !--more--&gt;&quot;,&quot;&quot;,&quot;t&quot;,-1),edButtons[130]=new d.SpellButton(),edButtons[140]=new d.CloseButton()})();
</del><span class="cx">\ No newline at end of file
</span><ins>+var QTags,edButtons=[],edCanvas;function quicktags(a){return new QTags(a)}function edInsertContent(b,a){return QTags.insertContent(a)}function edButton(f,e,c,b,a,d){return QTags.addButton(f,e,c,b,d,a)}(function(){var c=function(h){var g,f,e;if(typeof jQuery!=&quot;undefined&quot;){jQuery(document).ready(h)}else{g=c;g.funcs=[];g.ready=function(){if(!g.isReady){g.isReady=true;for(f=0;f&lt;g.funcs.length;f++){g.funcs[f]()}}};if(g.isReady){h()}else{g.funcs.push(h)}if(!g.eventAttached){if(document.addEventListener){e=function(){document.removeEventListener(&quot;DOMContentLoaded&quot;,e,false);g.ready()};document.addEventListener(&quot;DOMContentLoaded&quot;,e,false);window.addEventListener(&quot;load&quot;,g.ready,false)}else{if(document.attachEvent){e=function(){if(document.readyState===&quot;complete&quot;){document.detachEvent(&quot;onreadystatechange&quot;,e);g.ready()}};document.attachEvent(&quot;onreadystatechange&quot;,e);window.attachEvent(&quot;onload&quot;,
 g.ready);(function(){try{document.documentElement.doScroll(&quot;left&quot;)}catch(i){setTimeout(arguments.callee,50);return}g.ready()})()}}g.eventAttached=true}}},a=(function(){var e=new Date(),f;f=function(g){var h=g.toString();if(h.length&lt;2){h=&quot;0&quot;+h}return h};return e.getUTCFullYear()+&quot;-&quot;+f(e.getUTCMonth()+1)+&quot;-&quot;+f(e.getUTCDate())+&quot;T&quot;+f(e.getUTCHours())+&quot;:&quot;+f(e.getUTCMinutes())+&quot;:&quot;+f(e.getUTCSeconds())+&quot;+00:00&quot;})(),b={},d;d=QTags=function(k){if(typeof(k)==&quot;string&quot;){k={id:k}}else{if(typeof(k)!=&quot;object&quot;){return false}}var s=this,g=k.id,q={},p={},j=document.getElementById(g),e=&quot;qt_&quot;+g,o=&quot;&quot;,n,l,m,h,r,f;if(!g||!j){return false}s.name=e;s.id=g;s.canvas=j;for(n in edButtons){if(!edButtons[n]){continue}q[edButtons[n].id]=edButtons[n]}if(g==&quot;content&quot;&amp;&amp;adminpage&amp;&amp;(adminpage==&quot;post-new-php&quot;||adminpage==&quot;post-php&quot;)){q.fullscree
 n=new d.FullscreenButton();edCanvas=j;f=&quot;ed_toolbar&quot;}else{f=e+&quot;_toolbar&quot;}for(n in s._customButtons){q[n]=new s._customButtons[n]()}if(k.buttons){m=k.buttons.split(&quot;,&quot;);for(n in m){h=m[n];if(q[h]){p[h]=q[h]}}}else{p=q}if(k.disabled_buttons){m=k.disabled_buttons.split(&quot;,&quot;);for(n in m){h=m[n];if(p[h]){delete (p[h])}}}for(n in p){o+=p[n].html(e+&quot;_&quot;)}l=document.createElement(&quot;div&quot;);l.id=f;l.className=&quot;quicktags-toolbar&quot;;j.parentNode.insertBefore(l,j);l.innerHTML=o;s.toolbar=l;r=function(v){v=v||window.event;var u=v.target||v.srcElement,t;if(/\s+ed_button\s+/.test(&quot; &quot;+u.className+&quot; &quot;)){s.canvas=j=document.getElementById(g);t=u.id.replace(e+&quot;_&quot;,&quot;&quot;);if(p[t]){p[t].callback.call(p[t],u,j,s)}}};if(l.addEventListener){l.addEventListener(&quot;click&quot;,r,false)}else{if(l.attachEvent){l.attachEvent(&quot;onclick&quot;,r)}}s.getButton=function(i){return q[i]};d.instances[g]=s;if
 (!d.instances[0]){d.instances[0]=d.instances[g]}};d.instances={};d.registerButton=function(f,e){b[f]=e};d.getInstance=function(e){return d.instances[e]};d.addButton=function(e,k,j,i,h,g,l,m){var f;if(!e||!k){return}if(typeof(j)==&quot;function&quot;){f=new d.Button(e,k,g,l);f.callback=j}else{if(typeof(j)==&quot;string&quot;&amp;&amp;j&amp;&amp;i){f=new d.TagButton(e,k,j,i,g,h,l)}else{return}}if(m){while(typeof(edButtons[m])!=&quot;undefined&quot;){m++}edButtons[m]=f}else{edButtons[edButtons.length]=f}};d.insertContent=function(h){var i,g,f,j,k,e=document.getElementById(wpActiveEditor);if(!e){return false}if(document.selection){e.focus();i=document.selection.createRange();i.text=h;e.focus()}else{if(e.selectionStart||e.selectionStart==&quot;0&quot;){k=e.value;g=e.selectionStart;f=e.selectionEnd;j=e.scrollTop;e.value=k.substring(0,g)+h+k.substring(f,k.length);e.focus();e.selectionStart=g+h.length;e.selectionEnd=g+h.length;e.scrollTop=j}else{e.value+=h;e.focus()}}return true};d.
 Button=function(i,g,e,h){var f=this;f.id=i;f.display=g;f.access=e;f.title=h||&quot;&quot;};d.Button.prototype.html=function(f){var e=this.access?' accesskey=&quot;'+this.access+'&quot;':&quot;&quot;;return'&lt;input type=&quot;button&quot; id=&quot;'+f+this.id+'&quot;'+e+' class=&quot;ed_button&quot; title=&quot;'+this.title+'&quot; value=&quot;'+this.display+'&quot; /&gt;'};d.Button.prototype.callback=function(){};d.TagButton=function(l,j,g,f,e,h,k){var i=this;d.Button.call(i,l,j,e,k);i.tagStart=g;i.tagEnd=f;i.open=h};d.TagButton.prototype=new d.Button();d.TagButton.prototype.openTag=function(h,f){var g=this;if(!f.openTags){f.openTags=[]}if(g.tagEnd){f.openTags.push(g.id);h.value=&quot;/&quot;+h.value}};d.TagButton.prototype.closeTag=function(j,f){var h=this,g=h.isOpen(f);if(g!==false){f.openTags.splice(g,1)}j.value=h.display};d.TagButton.prototype.isOpen=function(e){var h=this,g=0,f=false;if(e.openTags){while(f===false&amp;&amp;g&lt;e.openTags.length){f=e.openTags[g]==h.id
 ?g:false;g++}}else{f=false}return f};d.TagButton.prototype.callback=function(p,j,q){var w=this,s,f,n,h,u=j.value,k,e,o,g,m=u?w.tagEnd:&quot;&quot;;if(document.selection){j.focus();g=document.selection.createRange();if(g.text.length&gt;0){g.text=w.tagStart+g.text+m}else{if(w.isOpen(q)===false||w.tagEnd===&quot;&quot;){g.text=w.tagStart;w.openTag(p,q)}else{g.text=m;w.closeTag(p,q)}}j.focus()}else{if(j.selectionStart||j.selectionStart==&quot;0&quot;){s=j.selectionStart;f=j.selectionEnd;n=f;h=j.scrollTop;k=u.substring(0,s);e=u.substring(f,u.length);o=u.substring(s,f);if(s!=f){j.value=k+w.tagStart+o+m+e;if(m===&quot;&quot;){n=s}n+=w.tagStart.length+m.length}else{if(w.isOpen(q)===false||w.tagEnd===&quot;&quot;){j.value=k+w.tagStart+e;w.openTag(p,q);n=s+w.tagStart.length}else{j.value=k+m+e;n=s+m.length;w.closeTag(p,q)}}j.focus();j.selectionStart=n;j.selectionEnd=n;j.scrollTop=h}else{if(w.isOpen(q)!==false||w.tagEnd===&quot;&quot;){j.value+=w.tagStart;w.openTag(p,q)}else{j.value+=m;
 w.closeTag(p,q)}j.focus()}}};d.SpellButton=function(){d.Button.call(this,&quot;spell&quot;,quicktagsL10n.lookup,&quot;&quot;,quicktagsL10n.dictionaryLookup)};d.SpellButton.prototype=new d.Button();d.SpellButton.prototype.callback=function(i,h,e){var k=&quot;&quot;,j,g,f;if(document.selection){h.focus();j=document.selection.createRange();if(j.text.length&gt;0){k=j.text}}else{if(h.selectionStart||h.selectionStart==&quot;0&quot;){g=h.selectionStart;f=h.selectionEnd;if(g!=f){k=h.value.substring(g,f)}}}if(k===&quot;&quot;){k=prompt(quicktagsL10n.wordLookup,&quot;&quot;)}if(k!==null&amp;&amp;/^\w[\w ]*$/.test(k)){window.open(&quot;http://www.answers.com/&quot;+encodeURIComponent(k))}};d.CloseButton=function(){d.Button.call(this,&quot;close&quot;,quicktagsL10n.closeTags,&quot;&quot;,quicktagsL10n.closeAllOpenTags)};d.CloseButton.prototype=new d.Button();d.CloseButton.prototype.callback=function(j,k,f){var h,g,i=f.openTags;if(i){while(i.length&gt;0){h=f.getButton(i[i.length-1]);g=do
 cument.getElementById(f.name+&quot;_&quot;+h.id);h.callback.call(h,g,k,f)}}};d.closeAllTags=function(g){var e=this.getInstance(g),f=e.getButton(&quot;close&quot;);f.callback.call(f,&quot;&quot;,e.canvas,e)};d.LinkButton=function(){d.TagButton.call(this,&quot;link&quot;,&quot;link&quot;,&quot;&quot;,&quot;&lt;/a&gt;&quot;,&quot;a&quot;)};d.LinkButton.prototype=new d.TagButton();d.LinkButton.prototype.callback=function(j,k,h,g){var f,i=this;if(typeof(wpLink)!=&quot;undefined&quot;){wpLink.open();return}if(!g){g=&quot;http://&quot;}if(i.isOpen(h)===false){f=prompt(quicktagsL10n.enterURL,g);if(f){i.tagStart='&lt;a href=&quot;'+f+'&quot;&gt;';d.TagButton.prototype.callback.call(i,j,k,h)}}else{d.TagButton.prototype.callback.call(i,j,k,h)}};d.ImgButton=function(){d.TagButton.call(this,&quot;img&quot;,&quot;img&quot;,&quot;&quot;,&quot;&quot;,&quot;m&quot;,-1)};d.ImgButton.prototype=new d.TagButton();d.ImgButton.prototype.callback=function(i,k,g,f){if(!f){f=&quot;http://&quot;}var j
 =prompt(quicktagsL10n.enterImageURL,f),h;if(j){h=prompt(quicktagsL10n.enterImageDescription,&quot;&quot;);this.tagStart='&lt;img src=&quot;'+j+'&quot; alt=&quot;'+h+'&quot; /&gt;';d.TagButton.prototype.callback.call(this,i,k,g)}};d.FullscreenButton=function(){d.Button.call(this,&quot;fullscreen&quot;,quicktagsL10n.fullscreen,&quot;f&quot;,quicktagsL10n.toggleFullscreen)};d.FullscreenButton.prototype=new d.Button();d.FullscreenButton.prototype.callback=function(f,g){if(g.id!=&quot;content&quot;||typeof(fullscreen)==&quot;undefined&quot;){return}fullscreen.on()};edButtons[10]=new d.TagButton(&quot;strong&quot;,&quot;b&quot;,&quot;&lt;strong&gt;&quot;,&quot;&lt;/strong&gt;&quot;,&quot;b&quot;);edButtons[20]=new d.TagButton(&quot;em&quot;,&quot;i&quot;,&quot;&lt;em&gt;&quot;,&quot;&lt;/em&gt;&quot;,&quot;i&quot;),edButtons[30]=new d.LinkButton(),edButtons[40]=new d.TagButton(&quot;block&quot;,&quot;b-quote&quot;,&quot;\n\n&lt;blockquote&gt;&quot;,&quot;&lt;/blockquote&gt;\n\n&qu
 ot;,&quot;q&quot;),edButtons[50]=new d.TagButton(&quot;del&quot;,&quot;del&quot;,'&lt;del datetime=&quot;'+a+'&quot;&gt;',&quot;&lt;/del&gt;&quot;,&quot;d&quot;),edButtons[60]=new d.TagButton(&quot;ins&quot;,&quot;ins&quot;,'&lt;ins datetime=&quot;'+a+'&quot;&gt;',&quot;&lt;/ins&gt;&quot;,&quot;s&quot;),edButtons[70]=new d.ImgButton(),edButtons[80]=new d.TagButton(&quot;ul&quot;,&quot;ul&quot;,&quot;&lt;ul&gt;\n&quot;,&quot;&lt;/ul&gt;\n\n&quot;,&quot;u&quot;),edButtons[90]=new d.TagButton(&quot;ol&quot;,&quot;ol&quot;,&quot;&lt;ol&gt;\n&quot;,&quot;&lt;/ol&gt;\n\n&quot;,&quot;o&quot;),edButtons[100]=new d.TagButton(&quot;li&quot;,&quot;li&quot;,&quot;\t&lt;li&gt;&quot;,&quot;&lt;/li&gt;\n&quot;,&quot;l&quot;),edButtons[110]=new d.TagButton(&quot;code&quot;,&quot;code&quot;,&quot;&lt;code&gt;&quot;,&quot;&lt;/code&gt;&quot;,&quot;c&quot;),edButtons[120]=new d.TagButton(&quot;more&quot;,&quot;more&quot;,&quot;&lt;!--more--&gt;&quot;,&quot;&quot;,&quot;t&quot;,-1),edButtons[13
 0]=new d.SpellButton(),edButtons[140]=new d.CloseButton()})();
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (18575 => 18576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2011-08-19 21:23:31 UTC (rev 18575)
+++ trunk/wp-includes/script-loader.php        2011-08-20 19:55:51 UTC (rev 18576)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> 
</span><span class="cx">         $scripts-&gt;add( 'sack', &quot;/wp-includes/js/tw-sack$suffix.js&quot;, false, '1.6.1', 1 );
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'quicktags', &quot;/wp-includes/js/quicktags$suffix.js&quot;, false, '20110819', 1 );
</del><ins>+        $scripts-&gt;add( 'quicktags', &quot;/wp-includes/js/quicktags$suffix.js&quot;, false, '20110820', 1 );
</ins><span class="cx">         $scripts-&gt;add_script_data( 'quicktags', 'quicktagsL10n', array(
</span><span class="cx">                 'wordLookup' =&gt; __('Enter a word to look up:'),
</span><span class="cx">                 'dictionaryLookup' =&gt; esc_attr(__('Dictionary lookup')),
</span><span class="lines">@@ -84,7 +84,7 @@
</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'), '20110802', 1 );
</del><ins>+        $scripts-&gt;add( 'editor', &quot;/wp-admin/js/editor$suffix.js&quot;, array('utils','jquery'), '20110820', 1 );
</ins><span class="cx"> 
</span><span class="cx">         $scripts-&gt;add( 'wp-fullscreen', &quot;/wp-admin/js/wp-fullscreen$suffix.js&quot;, array('jquery'), '20110802', 1 );
</span><span class="cx"> 
</span><span class="lines">@@ -269,7 +269,7 @@
</span><span class="cx"> 
</span><span class="cx">                 $scripts-&gt;add( 'admin-custom-fields', &quot;/wp-admin/js/custom-fields$suffix.js&quot;, array('wp-lists'), '20110429', 1 );
</span><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'admin-comments', &quot;/wp-admin/js/edit-comments$suffix.js&quot;, array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'jquery-query'), '20110804', 1 );
</del><ins>+                $scripts-&gt;add( 'admin-comments', &quot;/wp-admin/js/edit-comments$suffix.js&quot;, array('wp-lists', 'quicktags', 'jquery-query'), '20110820', 1 );
</ins><span class="cx">                 $scripts-&gt;add_script_data( 'admin-comments', 'adminCommentsL10n', array(
</span><span class="cx">                         'hotkeys_highlight_first' =&gt; isset($_GET['hotkeys_highlight_first']),
</span><span class="cx">                         'hotkeys_highlight_last' =&gt; isset($_GET['hotkeys_highlight_last']),
</span></span></pre>
</div>
</div>

</body>
</html>