-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] Set noopener feature when opening non-Kibana custom URLs #36205
[ML] Set noopener feature when opening non-Kibana custom URLs #36205
Conversation
Pinging @elastic/ml-ui |
@@ -119,7 +119,11 @@ export const LinksMenu = injectI18n(class LinksMenu extends Component { | |||
// Replace any tokens in the configured url_value with values from the source record, | |||
// and then open link in a new tab/window. | |||
const urlPath = replaceStringTokens(customUrl.url_value, record, true); | |||
window.open(urlPath, '_blank'); | |||
if (isKibanaUrl(customUrl) === true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this block of code is repeated a few times, would it be worth moving it to a function in custom_url_utils.js
called openURL
or something similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💔 Build Failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ⚡️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
36e869c
to
39e7a46
Compare
💚 Build Succeeded |
…c#36205) * [ML] Set noopener feature when opening non Kibana custom URLs * [ML] Refactor calls to open window into separate utils function
#36272) * [ML] Set noopener feature when opening non Kibana custom URLs * [ML] Refactor calls to open window into separate utils function
…c#36205) * [ML] Set noopener feature when opening non Kibana custom URLs * [ML] Refactor calls to open window into separate utils function
#36279) * [ML] Set noopener feature when opening non Kibana custom URLs * [ML] Refactor calls to open window into separate utils function
Summary
Adds
noopener
andnoreferrer
as window features to the popup window opened for custom URLs thatuse third party domains.
Checklist