Loading
Hide work item heading anchors with CSS
What does this MR do?
This MR hides the heading link icon in the work item drawer. The drawer used to change the description HTML with a text search and replace. That search looked for an attribute the Markdown pipeline no longer adds, so the icon stopped hiding about a year ago. Editing HTML as text can also undo the sanitization the backend did. This MR removes the HTML rewrite and hides the heading links with CSS instead, the same way Duo Chat already does it.
Screenshots
How to test
- Open a work item with a heading in its description, for example
## Heading. - Open it in the full page view. Hover the heading. The link icon shows.
- Open the work items list. Open the same work item from the list, so it opens in the drawer.
- Hover the heading in the drawer. The link icon does not show.
- In the drawer description, press Tab on the keyboard. Focus does not stop on the hidden heading link.
References
- Closes #627978 (closed)
- Related vulnerability, shows why editing HTML as text is risky: https://gitlab.com/gitlab-org/gitlab/-/work_items/580391
- Same CSS approach used for Duo Chat in
app/assets/stylesheets/framework/duo_chat.scss
Edited by Deepika Guliani