More fixes for #1515 "Rich text containing links still appears in PDF"

Transform all <a> elements, as those can appear outside of rich text controls, including in labels.