Commit 735393d8 authored by xjm's avatar xjm

Issue #3142818 by pradeepjha, Sivaji, andrewmacpherson: Remove target=_blank...

Issue #3142818 by pradeepjha, Sivaji, andrewmacpherson: Remove target=_blank from links in media settings forms
parent 2f51f441
......@@ -78,7 +78,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$domain = $this->config('media.settings')->get('iframe_domain');
if (!$this->iFrameUrlHelper->isSecure($domain)) {
$message = $this->t('It is potentially insecure to display oEmbed content in a frame that is served from the same domain as your main Drupal site, as this may allow execution of third-party code. <a href="https://oembed.com/#section3" target="_blank">Take a look here for more information</a>.');
$message = $this->t('It is potentially insecure to display oEmbed content in a frame that is served from the same domain as your main Drupal site, as this may allow execution of third-party code. Refer to <a href="https://oembed.com/#section3">oEmbed Security Considerations</a>.');
$this->messenger()->addWarning($message);
}
......
......@@ -301,7 +301,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
$domain = $this->configFactory->get('media.settings')->get('iframe_domain');
if (!$this->iFrameUrlHelper->isSecure($domain)) {
array_unshift($form, [
'#markup' => '<p>' . $this->t('It is potentially insecure to display oEmbed content in a frame that is served from the same domain as your main Drupal site, as this may allow execution of third-party code. <a href=":url" target="_blank">You can specify a different domain for serving oEmbed content here</a> (opens in a new window).', [
'#markup' => '<p>' . $this->t('It is potentially insecure to display oEmbed content in a frame that is served from the same domain as your main Drupal site, as this may allow execution of third-party code. <a href=":url">You can specify a different domain for serving oEmbed content in the Media settings</a>.', [
':url' => Url::fromRoute('media.settings')->setAbsolute()->toString(),
]) . '</p>',
]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment