Skip to content

Use textContent rather than innerHTML to obtain the label

If the element has children, innerHTML includes the corresponding tags, which shouldn't be displayed to the user. textContent doesn't have this issue (it has other problems, but they shouldn't matter in this situation).

Merge request reports