From a811f2194f9069ccc7e39c381ed0bc0d8878b017 Mon Sep 17 00:00:00 2001 From: Igor Zaytsev Date: Thu, 23 Apr 2020 09:21:21 -0400 Subject: [PATCH] Fix for main links --- x-pack/plugins/monitoring/public/angular/app_modules.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/monitoring/public/angular/app_modules.ts b/x-pack/plugins/monitoring/public/angular/app_modules.ts index c0b9339ad616b..cbf3e6477d30c 100644 --- a/x-pack/plugins/monitoring/public/angular/app_modules.ts +++ b/x-pack/plugins/monitoring/public/angular/app_modules.ts @@ -18,6 +18,7 @@ import { } from '../../../../../src/plugins/kibana_legacy/public'; import { MonitoringPluginDependencies } from '../types'; import { GlobalState } from '../url_state'; +import { getSafeForExternalLink } from '../lib/get_safe_for_external_link'; // @ts-ignore import { formatNumber, formatMetric } from '../lib/format_number'; @@ -234,7 +235,8 @@ function createHrefModule(core: AppMountContext['core']) { pre: (_$scope, _$el, $attr) => { $attr.$observe(name, val => { if (val) { - $attr.$set('href', core.http.basePath.prepend(val as string)); + const url = getSafeForExternalLink(val as string); + $attr.$set('href', core.http.basePath.prepend(url)); } }); },