Allow different tags in widget titles

I did not understand what you are doing in the function. See below example how title can be wrapped in the html tag:

function html_widget_title( $title ) {
  $output="<span class="icon-someicon">";
  $output .= $title;
  $output .= '</span>';
  return $output;
}
add_filter( 'widget_title', 'html_widget_title' );