generate html seems to be working correctly with text attribute