diff --git a/public/app/core/components/NavBar/DropdownChild.tsx b/public/app/core/components/NavBar/DropdownChild.tsx index abd9c95d6f2..ef229ff92c2 100644 --- a/public/app/core/components/NavBar/DropdownChild.tsx +++ b/public/app/core/components/NavBar/DropdownChild.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2, textUtil } from '@grafana/data'; import { Icon, IconName, Link, useTheme2 } from '@grafana/ui'; export interface Props { @@ -34,13 +34,15 @@ const DropdownChild = ({ isDivider = false, icon, onClick, target, text, url }: ); if (url) { + const sanitizedUrl = textUtil.sanitizeAngularInterpolation(url); + element = !target && url.startsWith('/') ? ( - + {linkContent} ) : ( - + {linkContent} );