Automattic/_s — pull request #345 by ounziw (2013-11-17 13:02:14+00:00)
Title: sanitize_html_class for $nav_id

sanitize_html_class is better than esc_attr, since sanitize_html_class strips the string down to A-Z,a-z,0-9,_,-, string allowed for id/class attributes.
http://codex.wordpress.org/Function_Reference/sanitize_html_class