Index: wp-includes/class-wp-widget.php
===================================================================
--- wp-includes/class-wp-widget.php	(revision 36220)
+++ wp-includes/class-wp-widget.php	(working copy)
@@ -152,7 +152,7 @@
 	 *                                information on accepted arguments. Default empty array.
 	 */
 	public function __construct( $id_base, $name, $widget_options = array(), $control_options = array() ) {
-		$this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', strtolower(get_class($this)) ) : strtolower($id_base);
+		$this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', sanitize_key( get_class( $this ) ) ) : sanitize_key( $id_base );
 		$this->name = $name;
 		$this->option_name = 'widget_' . $this->id_base;
 		$this->widget_options = wp_parse_args( $widget_options, array('classname' => $this->option_name) );
