<!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>[14826] trunk/wp-includes:
  Properly format menu item title attributes and descriptions.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14826">14826</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-05-23 22:56:51 +0000 (Sun, 23 May 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Properly format menu item title attributes and descriptions. props ryan, fixes <a href="http://trac.wordpress.org/ticket/12864">#12864</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesdefaultfiltersphp">trunk/wp-includes/default-filters.php</a></li>
<li><a href="#trunkwpincludesnavmenuphp">trunk/wp-includes/nav-menu.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesdefaultfiltersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/default-filters.php (14825 => 14826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/default-filters.php        2010-05-23 22:19:09 UTC (rev 14825)
+++ trunk/wp-includes/default-filters.php        2010-05-23 22:56:51 UTC (rev 14826)
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // Format titles
</span><del>-foreach ( array( 'single_post_title', 'single_cat_title', 'single_tag_title', 'single_month_title' ) as $filter ) {
</del><ins>+foreach ( array( 'single_post_title', 'single_cat_title', 'single_tag_title', 'single_month_title', 'nav_menu_attr_title', 'nav_menu_description' ) as $filter ) {
</ins><span class="cx">         add_filter( $filter, 'wptexturize' );
</span><span class="cx">         add_filter( $filter, 'strip_tags'  );
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpincludesnavmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/nav-menu.php (14825 => 14826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/nav-menu.php        2010-05-23 22:19:09 UTC (rev 14825)
+++ trunk/wp-includes/nav-menu.php        2010-05-23 22:56:51 UTC (rev 14826)
</span><span class="lines">@@ -584,8 +584,8 @@
</span><span class="cx"> 
</span><span class="cx">                         $menu_item-&gt;target = get_post_meta( $menu_item-&gt;ID, '_menu_item_target', true );
</span><span class="cx"> 
</span><del>-                        $menu_item-&gt;attr_title = strip_tags( $menu_item-&gt;post_excerpt );
-                        $menu_item-&gt;description = strip_tags( $menu_item-&gt;post_content );
</del><ins>+                        $menu_item-&gt;attr_title = apply_filters( 'nav_menu_attr_title', $menu_item-&gt;post_excerpt );
+                        $menu_item-&gt;description = apply_filters( 'nav_menu_description', $menu_item-&gt;post_content );
</ins><span class="cx"> 
</span><span class="cx">                         $menu_item-&gt;classes = get_post_meta( $menu_item-&gt;ID, '_menu_item_classes', true );
</span><span class="cx">                         $menu_item-&gt;xfn = get_post_meta( $menu_item-&gt;ID, '_menu_item_xfn', true );
</span><span class="lines">@@ -603,8 +603,8 @@
</span><span class="cx">                         $menu_item-&gt;url = get_permalink( $menu_item-&gt;ID );
</span><span class="cx">                         $menu_item-&gt;target = '';
</span><span class="cx"> 
</span><del>-                        $menu_item-&gt;attr_title = strip_tags( $menu_item-&gt;post_excerpt );
-                        $menu_item-&gt;description = strip_tags( $menu_item-&gt;post_content );
</del><ins>+                        $menu_item-&gt;attr_title = apply_filters( 'nav_menu_attr_title', $menu_item-&gt;post_excerpt );
+                        $menu_item-&gt;description = apply_filters( 'nav_menu_description', $menu_item-&gt;post_content );
</ins><span class="cx">                         $menu_item-&gt;classes = '';
</span><span class="cx">                         $menu_item-&gt;xfn = '';
</span><span class="cx">                 }
</span><span class="lines">@@ -624,7 +624,7 @@
</span><span class="cx">                 $menu_item-&gt;url = get_term_link( $menu_item, $menu_item-&gt;taxonomy );
</span><span class="cx">                 $menu_item-&gt;target = '';
</span><span class="cx">                 $menu_item-&gt;attr_title = '';
</span><del>-                $menu_item-&gt;description = strip_tags( get_term_field( 'description', $menu_item-&gt;term_id, $menu_item-&gt;taxonomy ) );
</del><ins>+                $menu_item-&gt;description = get_term_field( 'description', $menu_item-&gt;term_id, $menu_item-&gt;taxonomy );
</ins><span class="cx">                 $menu_item-&gt;classes = '';
</span><span class="cx">                 $menu_item-&gt;xfn = '';
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>