dealing with html code special char and optimized html parsing