Skip to content
Snippets Groups Projects
Commit b333f3fa authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fix path handling in `action_link()`, fixes #1188

Closes #1188

Merge request studip/studip!704
parent cbc5bec6
No related branches found
No related tags found
No related merge requests found
......@@ -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()));
}
/**
......
......@@ -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)
);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment