Now correctly handling escaped elements