Allowing HTML in Menu Descriptions

This has been answered elsewhere, but I am having a problem with the code. I’m using this:

remove_filter( 'nav_menu_description', 'strip_tags' );
add_filter( 'wp_setup_nav_menu_item', 'cus_wp_setup_nav_menu_item' );
function cus_wp_setup_nav_menu_item( $menu_item ) {
$menu_item->description = apply_filters( 'nav_menu_description', $menu_item->post_content );
return $menu_item;
}

This works fine except for when I first add the item to the menu. It then adds all the content from the post in the menu description area. Is there someway to avoid that? I can just delete the content after adding it the menu (and it works fine after that), but that is not very user friendly for my clients.

Related posts