<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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 #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#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>
<title>[16750] trunk:
  Fix handling of no titles and long titles in internal linking.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/16750">16750</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-12-06 16:28:06 +0000 (Mon, 06 Dec 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix handling of no titles and long titles in internal linking. see <a href="http://trac.wordpress.org/ticket/11240">#11240</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesinternallinkingphp">trunk/wp-admin/includes/internal-linking.php</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswplinkcsswplinkcss">trunk/wp-includes/js/tinymce/plugins/wplink/css/wplink.css</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswplinkcsswplinkdevcss">trunk/wp-includes/js/tinymce/plugins/wplink/css/wplink.dev.css</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswplinkjswplinkdevjs">trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswplinkjswplinkjs">trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.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="trunkwpadminincludesinternallinkingphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/internal-linking.php (16749 => 16750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/internal-linking.php        2010-12-06 16:24:05 UTC (rev 16749)
+++ trunk/wp-admin/includes/internal-linking.php        2010-12-06 16:28:06 UTC (rev 16750)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx"> 
</span><span class="cx">                 $results[] = array(
</span><span class="cx">                         'ID' =&gt; $post-&gt;ID,
</span><del>-                        'title' =&gt; esc_html( strip_tags($post-&gt;post_title) ),
</del><ins>+                        'title' =&gt; trim( esc_html( strip_tags( $post-&gt;post_title ) ) ),
</ins><span class="cx">                         'permalink' =&gt; get_permalink( $post-&gt;ID ),
</span><span class="cx">                         'info' =&gt; $info,
</span><span class="cx">                 );
</span></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswplinkcsswplinkcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/tinymce/plugins/wplink/css/wplink.css (16749 => 16750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wplink/css/wplink.css        2010-12-06 16:24:05 UTC (rev 16749)
+++ trunk/wp-includes/js/tinymce/plugins/wplink/css/wplink.css        2010-12-06 16:28:06 UTC (rev 16750)
</span><span class="lines">@@ -1 +1 @@
</span><del>-#wp-link p.howto{margin:3px;}#link-options{padding:10px 0 14px;border-bottom:1px solid #dfdfdf;margin:0 6px 14px;}#wp-link label input[type=&quot;text&quot;]{width:360px;margin-top:5px;}#wp-link label span{display:inline-block;width:80px;text-align:right;padding-right:5px;}#wp-link .link-search-wrapper{margin:5px 5px 9px;display:block;overflow:hidden;}#wp-link .link-search-wrapper span{float:left;margin-top:6px;}#wp-link .link-search-wrapper input[type=&quot;text&quot;]{float:left;width:220px;}#wp-link .link-search-wrapper img.waiting{margin:8px 1px 0 4px;float:left;display:none;}#wp-link .link-target{width:auto;padding:3px 0 0;margin:0 0 0 87px;font-size:11px;}#wp-link .query-results{border:1px #dfdfdf solid;margin:0 5px 5px;background:#fff;height:185px;overflow:auto;position:relative;}#wp-link li,#wp-link .query-notice{margin-bottom:0;border-bottom:1px solid #f1f1f1;color:#333;padding:4px 6px;cursor:pointer;}#wp-link li:hover{background:#eaf2fa;color:#151515;}#wp-link li.unselectable{border-bottom:1px solid #dfdfdf;}#wp-link li.unselectable:hover{background:#fff;cursor:auto;color:#333;}#wp-link li.selected{background:#ddd;color:#333;}#wp-link li.selected .item-title{font-weight:bold;}#wp-link .item-info{text-transform:uppercase;color:#666;font-size:11px;float:right;}#search-results{display:none;}#wp-link .river-waiting{display:none;padding:10px 0;}#wp-link .river-waiting img.waiting{margin:0 auto;display:block;}#wp-link .submitbox{padding:5px 10px;font-size:11px;overflow:auto;height:29px;}#wp-link-cancel{line-height:25px;float:left;}#wp-link-update{line-height:23px;float:right;}
</del><span class="cx">\ No newline at end of file
</span><ins>+#wp-link p.howto{margin:3px;}#link-options{padding:10px 0 14px;border-bottom:1px solid #dfdfdf;margin:0 6px 14px;}#wp-link label input[type=&quot;text&quot;]{width:360px;margin-top:5px;}#wp-link label span{display:inline-block;width:80px;text-align:right;padding-right:5px;}#wp-link .link-search-wrapper{margin:5px 5px 9px;display:block;overflow:hidden;}#wp-link .link-search-wrapper span{float:left;margin-top:6px;}#wp-link .link-search-wrapper input[type=&quot;text&quot;]{float:left;width:220px;}#wp-link .link-search-wrapper img.waiting{margin:8px 1px 0 4px;float:left;display:none;}#wp-link .link-target{width:auto;padding:3px 0 0;margin:0 0 0 87px;font-size:11px;}#wp-link .query-results{border:1px #dfdfdf solid;margin:0 5px 5px;background:#fff;height:185px;overflow:auto;position:relative;}#wp-link li,#wp-link .query-notice{clear:both;margin-bottom:0;border-bottom:1px solid #f1f1f1;color:#333;padding:4px 6px;cursor:pointer;}#wp-link li:hover{background:#eaf2fa;color:#151515;}#wp-link li.unselectable{border-bottom:1px solid #dfdfdf;}#wp-link li.unselectable:hover{background:#fff;cursor:auto;color:#333;}#wp-link li.selected{background:#ddd;color:#333;}#wp-link li.selected .item-title{font-weight:bold;}#wp-link .item-info{text-transform:uppercase;color:#666;font-size:11px;float:right;}#search-results{display:none;}#wp-link .river-waiting{display:none;padding:10px 0;}#wp-link .river-waiting img.waiting{margin:0 auto;display:block;}#wp-link .submitbox{padding:5px 10px;font-size:11px;overflow:auto;height:29px;}#wp-link-cancel{line-height:25px;float:left;}#wp-link-update{line-height:23px;float:right;}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswplinkcsswplinkdevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/tinymce/plugins/wplink/css/wplink.dev.css (16749 => 16750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wplink/css/wplink.dev.css        2010-12-06 16:24:05 UTC (rev 16749)
+++ trunk/wp-includes/js/tinymce/plugins/wplink/css/wplink.dev.css        2010-12-06 16:28:06 UTC (rev 16750)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> }
</span><span class="cx"> #wp-link li,
</span><span class="cx"> #wp-link .query-notice {
</span><ins>+        clear: both;
</ins><span class="cx">         margin-bottom: 0;
</span><span class="cx">         border-bottom: 1px solid #f1f1f1;
</span><span class="cx">         color: #333;
</span></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswplinkjswplinkdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js (16749 => 16750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js        2010-12-06 16:24:05 UTC (rev 16749)
+++ trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js        2010-12-06 16:28:06 UTC (rev 16750)
</span><span class="lines">@@ -355,7 +355,7 @@
</span><span class="cx">                                         list += alt ? '&lt;li class=&quot;alternate&quot;&gt;' : '&lt;li&gt;';
</span><span class="cx">                                         list += '&lt;input type=&quot;hidden&quot; class=&quot;item-permalink&quot; value=&quot;' + this['permalink'] + '&quot; /&gt;';
</span><span class="cx">                                         list += '&lt;span class=&quot;item-title&quot;&gt;';
</span><del>-                                        list += this['title'] ? this['title'] : '&lt;em&gt;'+ wpLinkL10n.untitled + '&lt;/em&gt;';
</del><ins>+                                        list += this['title'] ? this['title'] : '&lt;em&gt;'+ wpLinkL10n.noTitle + '&lt;/em&gt;';
</ins><span class="cx">                                         list += '&lt;/span&gt;&lt;span class=&quot;item-info&quot;&gt;' + this['info'] + '&lt;/span&gt;&lt;/li&gt;';
</span><span class="cx">                                         alt = ! alt;
</span><span class="cx">                                 });
</span></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswplinkjswplinkjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js (16749 => 16750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js        2010-12-06 16:24:05 UTC (rev 16749)
+++ trunk/wp-includes/js/tinymce/plugins/wplink/js/wplink.js        2010-12-06 16:28:06 UTC (rev 16750)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var wpLink;(function(f){var b={},e={},d,a,c;wpLink={timeToTriggerRiver:150,minRiverAJAXDuration:200,riverBottomThreshold:5,keySensitivity:100,lastSearch:&quot;&quot;,init:function(){b.dialog=f(&quot;#wp-link&quot;);b.submit=f(&quot;#wp-link-submit&quot;);b.url=f(&quot;#url-field&quot;);b.title=f(&quot;#link-title-field&quot;);b.openInNewTab=f(&quot;#link-target-checkbox&quot;);b.search=f(&quot;#search-field&quot;);e.search=new a(f(&quot;#search-results&quot;));e.recent=new a(f(&quot;#most-recent-results&quot;));e.elements=f(&quot;.query-results&quot;,b.dialog);b.dialog.keydown(wpLink.keydown);b.dialog.keyup(wpLink.keyup);b.submit.click(function(g){wpLink.update();g.preventDefault()});f(&quot;#wp-link-cancel&quot;).click(wpLink.cancel);e.elements.bind(&quot;river-select&quot;,wpLink.updateFields);b.search.keyup(wpLink.searchInternalLinks);b.dialog.bind(&quot;wpdialogrefresh&quot;,wpLink.refresh)},refresh:function(){var g;d=tinyMCEPopup.editor;e.search.refresh();e.recent.refresh();tinyMCEPopup.restoreSelection();if(g=d.dom.getParent(d.selection.getNode(),&quot;A&quot;)){b.url.val(g.href);b.title.val(d.dom.getAttrib(g,&quot;title&quot;));if(&quot;_blank&quot;==d.dom.getAttrib(g,&quot;target&quot;)){b.openInNewTab.attr(&quot;checked&quot;,&quot;checked&quot;)}b.submit.val(wpLinkL10n.update)}else{wpLink.setDefaultValues();b.submit.val(wpLinkL10n.save)}tinyMCEPopup.storeSelection();b.url.focus()[0].select();if(!e.recent.ul.children().length){e.recent.ajax()}},cancel:function(){tinyMCEPopup.close()},update:function(){var h=tinyMCEPopup.editor,i={href:b.url.val(),title:b.title.val(),target:b.openInNewTab.attr(&quot;checked&quot;)?&quot;_blank&quot;:&quot;&quot;},j,g;tinyMCEPopup.restoreSelection();j=h.dom.getParent(h.selection.getNode(),&quot;A&quot;);if(!i.href||i.href==&quot;http://&quot;){if(j){tinyMCEPopup.execCommand(&quot;mceBeginUndoLevel&quot;);g=h.selection.getBookmark();h.dom.remove(j,1);h.selection.moveToBookmark(g);tinyMCEPopup.execCommand(&quot;mceEndUndoLevel&quot;);tinyMCEPopup.close()}return}tinyMCEPopup.execCommand(&quot;mceBeginUndoLevel&quot;);if(j==null){h.getDoc().execCommand(&quot;unlink&quot;,false,null);tinyMCEPopup.execCommand(&quot;CreateLink&quot;,false,&quot;#mce_temp_url#&quot;,{skip_undo:1});tinymce.each(h.dom.select(&quot;a&quot;),function(k){if(h.dom.getAttrib(k,&quot;href&quot;)==&quot;#mce_temp_url#&quot;){j=k;h.dom.setAttribs(j,i)}});if(f(j).text()==&quot;#mce_temp_url#&quot;){h.dom.remove(j);j=null}}else{h.dom.setAttribs(j,i)}if(j&amp;&amp;(j.childNodes.length!=1||j.firstChild.nodeName!=&quot;IMG&quot;)){h.focus();h.selection.select(j);h.selection.collapse(0);tinyMCEPopup.storeSelection()}tinyMCEPopup.execCommand(&quot;mceEndUndoLevel&quot;);tinyMCEPopup.close()},updateFields:function(i,h,g){b.url.val(h.children(&quot;.item-permalink&quot;).val());b.title.val(h.children(&quot;.item-title&quot;).text());if(g&amp;&amp;g.type==&quot;click&quot;){b.url.focus()}},setDefaultValues:function(){b.url.val(&quot;http://&quot;);b.title.val(&quot;&quot;)},searchInternalLinks:function(){var h=f(this),i,g=h.val();if(g.length&gt;2){e.recent.hide();e.search.show();if(wpLink.lastSearch==g){return}wpLink.lastSearch=g;i=h.siblings(&quot;img.waiting&quot;).show();e.search.change(g);e.search.ajax(function(){i.hide()})}else{e.search.hide();e.recent.show()}},next:function(){e.search.next();e.recent.next()},prev:function(){e.search.prev();e.recent.prev()},keydown:function(i){var h,g=f.ui.keyCode;switch(i.which){case g.UP:h=&quot;prev&quot;;case g.DOWN:h=h||&quot;next&quot;;clearInterval(wpLink.keyInterval);wpLink[h]();wpLink.keyInterval=setInterval(wpLink[h],wpLink.keySensitivity);break;default:return}i.preventDefault()},keyup:function(h){var g=f.ui.keyCode;switch(h.which){case g.ESCAPE:wpLink.cancel();break;case g.UP:case g.DOWN:clearInterval(wpLink.keyInterval);break;default:return}h.preventDefault()},delayedCallback:function(i,g){var l,k,j,h;if(!g){return i}setTimeout(function(){if(k){return i.apply(h,j)}l=true},g);return function(){if(l){return i.apply(this,arguments)}j=arguments;h=this;k=true}}};a=function(i,h){var g=this;this.element=i;this.ul=i.children(&quot;ul&quot;);this.waiting=i.find(&quot;.river-waiting&quot;);this.change(h);this.refresh();i.scroll(function(){g.maybeLoad()});i.delegate(&quot;li&quot;,&quot;click&quot;,function(j){g.select(f(this),j)})};f.extend(a.prototype,{refresh:function(){this.deselect();this.visible=this.element.is(&quot;:visible&quot;)},show:function(){if(!this.visible){this.deselect();this.element.show();this.visible=true}},hide:function(){this.element.hide();this.visible=false},select:function(h,k){var j,i,l,g;if(h.hasClass(&quot;unselectable&quot;)||h==this.selected){return}this.deselect();this.selected=h.addClass(&quot;selected&quot;);j=h.outerHeight();i=this.element.height();l=h.position().top;g=this.element.scrollTop();if(l&lt;0){this.element.scrollTop(g+l)}else{if(l+j&gt;i){this.element.scrollTop(g+l-i+j)}}this.element.trigger(&quot;river-select&quot;,[h,k,this])},deselect:function(){if(this.selected){this.selected.removeClass(&quot;selected&quot;)}this.selected=false},prev:function(){if(!this.visible){return}var g;if(this.selected){g=this.selected.prev(&quot;li&quot;);if(g.length){this.select(g)}}},next:function(){if(!this.visible){return}var g=this.selected?this.selected.next(&quot;li&quot;):f(&quot;li:not(.unselectable):first&quot;,this.element);if(g.length){this.select(g)}},ajax:function(j){var h=this,i=this.query.page==1?0:wpLink.minRiverAJAXDuration,g=wpLink.delayedCallback(function(k,l){h.process(k,l);if(j){j(k,l)}},i);this.query.ajax(g)},change:function(g){if(this.query&amp;&amp;this._search==g){return}this._search=g;this.query=new c(g);this.element.scrollTop(0)},process:function(g,k){var h=&quot;&quot;,i=true,j=k.page==1;if(!g){if(j){h+='&lt;li class=&quot;unselectable&quot;&gt;&lt;span class=&quot;item-title&quot;&gt;&lt;em&gt;'+wpLinkL10n.noMatchesFound+&quot;&lt;/em&gt;&lt;/span&gt;&lt;/li&gt;&quot;}}else{f.each(g,function(){h+=i?'&lt;li class=&quot;alternate&quot;&gt;':&quot;&lt;li&gt;&quot;;h+='&lt;input type=&quot;hidden&quot; class=&quot;item-permalink&quot; value=&quot;'+this[&quot;permalink&quot;]+'&quot; /&gt;';h+='&lt;span class=&quot;item-title&quot;&gt;';h+=this[&quot;title&quot;]?this[&quot;title&quot;]:&quot;&lt;em&gt;&quot;+wpLinkL10n.untitled+&quot;&lt;/em&gt;&quot;;h+='&lt;/span&gt;&lt;span class=&quot;item-info&quot;&gt;'+this[&quot;info&quot;]+&quot;&lt;/span&gt;&lt;/li&gt;&quot;;i=!i})}this.ul[j?&quot;html&quot;:&quot;append&quot;](h)},maybeLoad:function(){var h=this,i=this.element,g=i.scrollTop()+i.height();if(!this.query.ready()||g&lt;this.ul.height()-wpLink.riverBottomThreshold){return}setTimeout(function(){var j=i.scrollTop(),k=j+i.height();if(!h.query.ready()||k&lt;h.ul.height()-wpLink.riverBottomThreshold){return}h.waiting.show();i.scrollTop(j+h.waiting.outerHeight());h.ajax(function(){h.waiting.hide()})},wpLink.timeToTriggerRiver)}});c=function(g){this.page=1;this.allLoaded=false;this.querying=false;this.search=g};f.extend(c.prototype,{ready:function(){return !(this.querying||this.allLoaded)},ajax:function(i){var g=this,h={action:&quot;wp-link-ajax&quot;,page:this.page};if(this.search){h.search=this.search}this.querying=true;f.post(ajaxurl,h,function(j){g.page++;g.querying=false;g.allLoaded=!j;i(j,h)},&quot;json&quot;)}});f(document).ready(wpLink.init)})(jQuery);
</del><span class="cx">\ No newline at end of file
</span><ins>+var wpLink;(function(f){var b={},e={},d,a,c;wpLink={timeToTriggerRiver:150,minRiverAJAXDuration:200,riverBottomThreshold:5,keySensitivity:100,lastSearch:&quot;&quot;,init:function(){b.dialog=f(&quot;#wp-link&quot;);b.submit=f(&quot;#wp-link-submit&quot;);b.url=f(&quot;#url-field&quot;);b.title=f(&quot;#link-title-field&quot;);b.openInNewTab=f(&quot;#link-target-checkbox&quot;);b.search=f(&quot;#search-field&quot;);e.search=new a(f(&quot;#search-results&quot;));e.recent=new a(f(&quot;#most-recent-results&quot;));e.elements=f(&quot;.query-results&quot;,b.dialog);b.dialog.keydown(wpLink.keydown);b.dialog.keyup(wpLink.keyup);b.submit.click(function(g){wpLink.update();g.preventDefault()});f(&quot;#wp-link-cancel&quot;).click(wpLink.cancel);e.elements.bind(&quot;river-select&quot;,wpLink.updateFields);b.search.keyup(wpLink.searchInternalLinks);b.dialog.bind(&quot;wpdialogrefresh&quot;,wpLink.refresh)},refresh:function(){var g;d=tinyMCEPopup.editor;e.search.refresh();e.recent.refresh();tinyMCEPopup.restoreSelection();if(g=d.dom.getParent(d.selection.getNode(),&quot;A&quot;)){b.url.val(g.href);b.title.val(d.dom.getAttrib(g,&quot;title&quot;));if(&quot;_blank&quot;==d.dom.getAttrib(g,&quot;target&quot;)){b.openInNewTab.attr(&quot;checked&quot;,&quot;checked&quot;)}b.submit.val(wpLinkL10n.update)}else{wpLink.setDefaultValues();b.submit.val(wpLinkL10n.save)}tinyMCEPopup.storeSelection();b.url.focus()[0].select();if(!e.recent.ul.children().length){e.recent.ajax()}},cancel:function(){tinyMCEPopup.close()},update:function(){var h=tinyMCEPopup.editor,i={href:b.url.val(),title:b.title.val(),target:b.openInNewTab.attr(&quot;checked&quot;)?&quot;_blank&quot;:&quot;&quot;},j,g;tinyMCEPopup.restoreSelection();j=h.dom.getParent(h.selection.getNode(),&quot;A&quot;);if(!i.href||i.href==&quot;http://&quot;){if(j){tinyMCEPopup.execCommand(&quot;mceBeginUndoLevel&quot;);g=h.selection.getBookmark();h.dom.remove(j,1);h.selection.moveToBookmark(g);tinyMCEPopup.execCommand(&quot;mceEndUndoLevel&quot;);tinyMCEPopup.close()}return}tinyMCEPopup.execCommand(&quot;mceBeginUndoLevel&quot;);if(j==null){h.getDoc().execCommand(&quot;unlink&quot;,false,null);tinyMCEPopup.execCommand(&quot;CreateLink&quot;,false,&quot;#mce_temp_url#&quot;,{skip_undo:1});tinymce.each(h.dom.select(&quot;a&quot;),function(k){if(h.dom.getAttrib(k,&quot;href&quot;)==&quot;#mce_temp_url#&quot;){j=k;h.dom.setAttribs(j,i)}});if(f(j).text()==&quot;#mce_temp_url#&quot;){h.dom.remove(j);j=null}}else{h.dom.setAttribs(j,i)}if(j&amp;&amp;(j.childNodes.length!=1||j.firstChild.nodeName!=&quot;IMG&quot;)){h.focus();h.selection.select(j);h.selection.collapse(0);tinyMCEPopup.storeSelection()}tinyMCEPopup.execCommand(&quot;mceEndUndoLevel&quot;);tinyMCEPopup.close()},updateFields:function(i,h,g){b.url.val(h.children(&quot;.item-permalink&quot;).val());b.title.val(h.children(&quot;.item-title&quot;).text());if(g&amp;&amp;g.type==&quot;click&quot;){b.url.focus()}},setDefaultValues:function(){b.url.val(&quot;http://&quot;);b.title.val(&quot;&quot;)},searchInternalLinks:function(){var h=f(this),i,g=h.val();if(g.length&gt;2){e.recent.hide();e.search.show();if(wpLink.lastSearch==g){return}wpLink.lastSearch=g;i=h.siblings(&quot;img.waiting&quot;).show();e.search.change(g);e.search.ajax(function(){i.hide()})}else{e.search.hide();e.recent.show()}},next:function(){e.search.next();e.recent.next()},prev:function(){e.search.prev();e.recent.prev()},keydown:function(i){var h,g=f.ui.keyCode;switch(i.which){case g.UP:h=&quot;prev&quot;;case g.DOWN:h=h||&quot;next&quot;;clearInterval(wpLink.keyInterval);wpLink[h]();wpLink.keyInterval=setInterval(wpLink[h],wpLink.keySensitivity);break;default:return}i.preventDefault()},keyup:function(h){var g=f.ui.keyCode;switch(h.which){case g.ESCAPE:wpLink.cancel();break;case g.UP:case g.DOWN:clearInterval(wpLink.keyInterval);break;default:return}h.preventDefault()},delayedCallback:function(i,g){var l,k,j,h;if(!g){return i}setTimeout(function(){if(k){return i.apply(h,j)}l=true},g);return function(){if(l){return i.apply(this,arguments)}j=arguments;h=this;k=true}}};a=function(i,h){var g=this;this.element=i;this.ul=i.children(&quot;ul&quot;);this.waiting=i.find(&quot;.river-waiting&quot;);this.change(h);this.refresh();i.scroll(function(){g.maybeLoad()});i.delegate(&quot;li&quot;,&quot;click&quot;,function(j){g.select(f(this),j)})};f.extend(a.prototype,{refresh:function(){this.deselect();this.visible=this.element.is(&quot;:visible&quot;)},show:function(){if(!this.visible){this.deselect();this.element.show();this.visible=true}},hide:function(){this.element.hide();this.visible=false},select:function(h,k){var j,i,l,g;if(h.hasClass(&quot;unselectable&quot;)||h==this.selected){return}this.deselect();this.selected=h.addClass(&quot;selected&quot;);j=h.outerHeight();i=this.element.height();l=h.position().top;g=this.element.scrollTop();if(l&lt;0){this.element.scrollTop(g+l)}else{if(l+j&gt;i){this.element.scrollTop(g+l-i+j)}}this.element.trigger(&quot;river-select&quot;,[h,k,this])},deselect:function(){if(this.selected){this.selected.removeClass(&quot;selected&quot;)}this.selected=false},prev:function(){if(!this.visible){return}var g;if(this.selected){g=this.selected.prev(&quot;li&quot;);if(g.length){this.select(g)}}},next:function(){if(!this.visible){return}var g=this.selected?this.selected.next(&quot;li&quot;):f(&quot;li:not(.unselectable):first&quot;,this.element);if(g.length){this.select(g)}},ajax:function(j){var h=this,i=this.query.page==1?0:wpLink.minRiverAJAXDuration,g=wpLink.delayedCallback(function(k,l){h.process(k,l);if(j){j(k,l)}},i);this.query.ajax(g)},change:function(g){if(this.query&amp;&amp;this._search==g){return}this._search=g;this.query=new c(g);this.element.scrollTop(0)},process:function(g,k){var h=&quot;&quot;,i=true,j=k.page==1;if(!g){if(j){h+='&lt;li class=&quot;unselectable&quot;&gt;&lt;span class=&quot;item-title&quot;&gt;&lt;em&gt;'+wpLinkL10n.noMatchesFound+&quot;&lt;/em&gt;&lt;/span&gt;&lt;/li&gt;&quot;}}else{f.each(g,function(){h+=i?'&lt;li class=&quot;alternate&quot;&gt;':&quot;&lt;li&gt;&quot;;h+='&lt;input type=&quot;hidden&quot; class=&quot;item-permalink&quot; value=&quot;'+this[&quot;permalink&quot;]+'&quot; /&gt;';h+='&lt;span class=&quot;item-title&quot;&gt;';h+=this[&quot;title&quot;]?this[&quot;title&quot;]:&quot;&lt;em&gt;&quot;+wpLinkL10n.noTitle+&quot;&lt;/em&gt;&quot;;h+='&lt;/span&gt;&lt;span class=&quot;item-info&quot;&gt;'+this[&quot;info&quot;]+&quot;&lt;/span&gt;&lt;/li&gt;&quot;;i=!i})}this.ul[j?&quot;html&quot;:&quot;append&quot;](h)},maybeLoad:function(){var h=this,i=this.element,g=i.scrollTop()+i.height();if(!this.query.ready()||g&lt;this.ul.height()-wpLink.riverBottomThreshold){return}setTimeout(function(){var j=i.scrollTop(),k=j+i.height();if(!h.query.ready()||k&lt;h.ul.height()-wpLink.riverBottomThreshold){return}h.waiting.show();i.scrollTop(j+h.waiting.outerHeight());h.ajax(function(){h.waiting.hide()})},wpLink.timeToTriggerRiver)}});c=function(g){this.page=1;this.allLoaded=false;this.querying=false;this.search=g};f.extend(c.prototype,{ready:function(){return !(this.querying||this.allLoaded)},ajax:function(i){var g=this,h={action:&quot;wp-link-ajax&quot;,page:this.page};if(this.search){h.search=this.search}this.querying=true;f.post(ajaxurl,h,function(j){g.page++;g.querying=false;g.allLoaded=!j;i(j,h)},&quot;json&quot;)}});f(document).ready(wpLink.init)})(jQuery);
</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 (16749 => 16750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2010-12-06 16:24:05 UTC (rev 16749)
+++ trunk/wp-includes/script-loader.php        2010-12-06 16:28:06 UTC (rev 16750)
</span><span class="lines">@@ -270,11 +270,11 @@
</span><span class="cx">                 'l10n_print_after' =&gt; 'try{convertEntities(adminBarL10n);}catch(e){};',
</span><span class="cx">         ) );
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'wplink', &quot;/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js&quot;, array('jquery'), '20101123' );
</del><ins>+        $scripts-&gt;add( 'wplink', &quot;/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js&quot;, array('jquery'), '20101206' );
</ins><span class="cx">         $scripts-&gt;localize( 'wplink', 'wpLinkL10n', array(
</span><span class="cx">                 'update' =&gt; __('Update'),
</span><span class="cx">                 'save' =&gt; __('Save Link'),
</span><del>-                'untitled' =&gt; __('Untitled'),
</del><ins>+                'noTitle' =&gt; __('(no title)'),
</ins><span class="cx">                 'noMatchesFound' =&gt; __('No matches found.'),
</span><span class="cx">                 'l10n_print_after' =&gt; 'try{convertEntities(wpLinkL10n);}catch(e){};',
</span><span class="cx">         ) );
</span><span class="lines">@@ -518,7 +518,7 @@
</span><span class="cx">         $styles-&gt;add( 'nav-menu', &quot;/wp-admin/css/nav-menu$suffix.css&quot;, array(), '20100907' );
</span><span class="cx">         $styles-&gt;add( 'admin-bar', &quot;/wp-includes/css/admin-bar$suffix.css&quot;, array(), '20101201' );
</span><span class="cx">         $styles-&gt;add( 'wp-jquery-ui-dialog', &quot;/wp-includes/css/jquery-ui-dialog$suffix.css&quot;, array(), '20101119' );
</span><del>-        $styles-&gt;add( 'wplink', &quot;/wp-includes/js/tinymce/plugins/wplink/css/wplink$suffix.css&quot;, array(), '20101123' );
</del><ins>+        $styles-&gt;add( 'wplink', &quot;/wp-includes/js/tinymce/plugins/wplink/css/wplink$suffix.css&quot;, array(), '20101206' );
</ins><span class="cx"> 
</span><span class="cx">         foreach ( $rtl_styles as $rtl_style ) {
</span><span class="cx">                 $styles-&gt;add_data( $rtl_style, 'rtl', true );
</span></span></pre>
</div>
</div>

</body>
</html>