Skip to content
This repository was archived by the owner on Nov 15, 2021. It is now read-only.

Commit f9ee5b1

Browse files
committed
Published iframeResizer.contentWindow.js URL is now absolute, to avoid possible issues if iFrame is also injected with <base> tag.
1 parent f1244dc commit f9ee5b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

IFrameResizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use yii\base\Widget;
1212
use yii\base\InvalidConfigException;
1313
use yii\helpers\Html;
14-
use DOMDocument;
14+
use yii\helpers\Url;
1515

1616
/**
1717
* IFrameResizer provides convenient shortcut methods allowing to embed iframeResizer.contentWindow.min.js file inside iFrames.
@@ -71,6 +71,6 @@ public function getScriptUrl()
7171
$contentWindowJS = YII_DEBUG ? 'iframeResizer.contentWindow.js' : 'iframeResizer.contentWindow.min.js';
7272
$assetManager = $this->view->getAssetManager();
7373
$assetBundle = $assetManager->getBundle(IFrameResizerAsset::className()); // this does the publishing
74-
return $assetManager->getAssetUrl($assetBundle, $contentWindowJS);
74+
return Url::base(true) . $assetManager->getAssetUrl($assetBundle, $contentWindowJS);
7575
}
7676
}

0 commit comments

Comments
 (0)