Fixed trimming for anchor, emphasis and strong tags