Fix issue on terms page with mermaid plots

What does this MR do and why?

Fix issue on terms page with mermaid plots

When the terms page contains a mermaid plot it is rendered in a sandboxed iframe (/-/sandbox/mermaid), however the URL is redirected again to the terms page. Here we resolve this issue.

Changelog: changed

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Enforce terms of service in the admin interface: /admin/application_settings/general#js-terms-settings
  2. Add a mermaid plot, for example:
```mermaid
graph TD;
  A-->B;
  A-->C;
  B-->D;
  C-->D;
```
  1. Check the terms page: /-/users/terms
Edited by Eduardo Sanz García

Merge request reports

Loading