updated genarate_string method to support html strings

A small change to generate html strings using `generate_string` method..