Browse Source

Html::url() fix for anchors

tags/2.0.0-beta
Alexander Kochetov 12 years ago
parent
commit
153e51df94
  1. 2
      framework/yii/helpers/base/Html.php

2
framework/yii/helpers/base/Html.php

@ -1364,7 +1364,7 @@ class Html
return Yii::$app->getRequest()->getUrl();
} else {
$url = Yii::getAlias($url);
if ($url[0] === '/' || strpos($url, '://')) {
if ($url[0] === '/' || $url[0] === '#' || strpos($url, '://')) {
return $url;
} else {
return Yii::$app->getRequest()->getBaseUrl() . '/' . $url;

Loading…
Cancel
Save