added handling &nbsp; correctly
separated functions html2text and cleanHtml