handle splitting for special chars and html codes