Handle anchor tags properly