small extension to generate minimal dom for Typeahead and small improvement on htmlAttributes processing