Commit ffa596f5 by Qiang Xue

Fixes #3934: yii.handleAction() in yii.js does not handle the case when a…

Fixes #3934: yii.handleAction() in yii.js does not handle the case when a hyperlink is a hash character
parent 8c8a3898
...@@ -49,6 +49,7 @@ Yii Framework 2 Change Log ...@@ -49,6 +49,7 @@ Yii Framework 2 Change Log
- Bug #3843: Fixed Menu bug when using `template` with `encodeLabel` => false (creocoder, umneeq) - Bug #3843: Fixed Menu bug when using `template` with `encodeLabel` => false (creocoder, umneeq)
- Bug #3863: Fixed incorrect js selector for `\yii\widgets\ActiveForm::errorSummaryCssClass` when it contains multiple classes (creocoder, umneeq) - Bug #3863: Fixed incorrect js selector for `\yii\widgets\ActiveForm::errorSummaryCssClass` when it contains multiple classes (creocoder, umneeq)
- Bug #3909: `Html::to()` should not prefix base URL to URLs that already contain scheme (qiangxue) - Bug #3909: `Html::to()` should not prefix base URL to URLs that already contain scheme (qiangxue)
- Bug #3934: yii.handleAction() in yii.js does not handle the case when a hyperlink is a hash character (qiangxue)
- Bug: Fixed inconsistent return of `\yii\console\Application::runAction()` (samdark) - Bug: Fixed inconsistent return of `\yii\console\Application::runAction()` (samdark)
- Bug: URL encoding for the route parameter added to `\yii\web\UrlManager` (klimov-paul) - Bug: URL encoding for the route parameter added to `\yii\web\UrlManager` (klimov-paul)
- Bug: Fixed the bug that requesting protected or private action methods would cause 500 error instead of 404 (qiangxue) - Bug: Fixed the bug that requesting protected or private action methods would cause 500 error instead of 404 (qiangxue)
......
...@@ -117,7 +117,7 @@ yii = (function ($) { ...@@ -117,7 +117,7 @@ yii = (function ($) {
var $form = $e.closest('form'); var $form = $e.closest('form');
var action = $e.prop('href'); var action = $e.prop('href');
var newForm = !$form.length || action; var newForm = !$form.length || action && action != '#';
if (newForm) { if (newForm) {
if (!action || !action.match(/(^\/|:\/\/)/)) { if (!action || !action.match(/(^\/|:\/\/)/)) {
action = window.location.href; action = window.location.href;
......
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