Skip to content

Commit

Permalink
Fix for main links
Browse files Browse the repository at this point in the history
  • Loading branch information
igoristic committed Apr 23, 2020
1 parent 79bcef7 commit a811f21
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x-pack/plugins/monitoring/public/angular/app_modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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));
}
});
},
Expand Down

0 comments on commit a811f21

Please sign in to comment.