fixed an issue related to invalid removal of some html whitespaces like &nbsp