Java static method to detect text that has been marked up with HTML tags or entities