added checks for HTML