diff --git a/app/controllers/studip_controller.php b/app/controllers/studip_controller.php index a08a9463c386d013cf3007ee4fe61a551debc91e..e05115562560a9887ac6a35282aa2e429c0f90c1 100644 --- a/app/controllers/studip_controller.php +++ b/app/controllers/studip_controller.php @@ -740,10 +740,7 @@ abstract class StudipController extends Trails_Controller */ public function action_link($action) { - $arguments = func_get_args(); - array_unshift($arguments, $this->controller_path()); - - return $this->link_for(...$arguments); + return htmlReady($this->action_url(...func_get_args())); } /** diff --git a/tests/unit/lib/classes/StudipControllerTest.php b/tests/unit/lib/classes/StudipControllerTest.php index a7009fe2aa504c4a8f23e662203e3ccd71f11d81..532116677ae115810f20a2a15750318d1a9eaafe 100644 --- a/tests/unit/lib/classes/StudipControllerTest.php +++ b/tests/unit/lib/classes/StudipControllerTest.php @@ -76,6 +76,12 @@ final class StudipControllerTest extends Codeception\Test\Unit $expected, $this->getRelativeURL($url) ); + + $link = $this->getController()->action_link(...$args); + $this->assertEquals( + htmlspecialchars($expected), + $this->getRelativeURL($link) + ); } /**