Escape quote marks in tags properly