diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-02-05 21:24:22 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-02-05 21:24:22 -0500 |
commit | ffb8494fec7bacedca8921185d69192bff848cd3 (patch) | |
tree | 2a8019ea1558888791431766a02bb65f44b806be | |
parent | 1bd96e8735b26a4efd2dc430ee9be002c825b04b (diff) |
Category label is broken on the board if there's a url in the description
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | app/Helper/Url.php | 2 | ||||
-rw-r--r-- | tests/units/Helper/UrlHelperTest.php | 6 |
3 files changed, 5 insertions, 4 deletions
@@ -40,6 +40,7 @@ Improvements: Bug fixes: +* Category label is broken on the board if there's a url in the description * Fix pagination on task time tracking page Version 1.0.24 diff --git a/app/Helper/Url.php b/app/Helper/Url.php index 720297cf..7de8a571 100644 --- a/app/Helper/Url.php +++ b/app/Helper/Url.php @@ -44,7 +44,7 @@ class Url extends Base */ public function link($label, $controller, $action, array $params = array(), $csrf = false, $class = '', $title = '', $new_tab = false, $anchor = '') { - return '<a href="'.$this->href($controller, $action, $params, $csrf, $anchor).'" class="'.$class.'" title="'.$title.'" '.($new_tab ? 'target="_blank"' : '').'>'.$label.'</a>'; + return '<a href="'.$this->href($controller, $action, $params, $csrf, $anchor).'" class="'.$class.'" title=\''.$title.'\' '.($new_tab ? 'target="_blank"' : '').'>'.$label.'</a>'; } /** diff --git a/tests/units/Helper/UrlHelperTest.php b/tests/units/Helper/UrlHelperTest.php index 9f26a802..15e01237 100644 --- a/tests/units/Helper/UrlHelperTest.php +++ b/tests/units/Helper/UrlHelperTest.php @@ -12,7 +12,7 @@ class UrlHelperTest extends Base { $h = new Url($this->container); $this->assertEquals( - '<a href="?controller=a&action=b&d=e&plugin=something" class="f" title="g" target="_blank">label</a>', + '<a href="?controller=a&action=b&d=e&plugin=something" class="f" title=\'g\' target="_blank">label</a>', $h->link('label', 'a', 'b', array('d' => 'e', 'plugin' => 'something'), false, 'f', 'g', true) ); } @@ -24,7 +24,7 @@ class UrlHelperTest extends Base $h = new Url($this->container); $this->assertEquals( - '<a href="myplugin/something/e" class="f" title="g" target="_blank">label</a>', + '<a href="myplugin/something/e" class="f" title=\'g\' target="_blank">label</a>', $h->link('label', 'a', 'b', array('d' => 'e', 'plugin' => 'something'), false, 'f', 'g', true) ); } @@ -33,7 +33,7 @@ class UrlHelperTest extends Base { $h = new Url($this->container); $this->assertEquals( - '<a href="?controller=a&action=b&d=e" class="f" title="g" target="_blank">label</a>', + '<a href="?controller=a&action=b&d=e" class="f" title=\'g\' target="_blank">label</a>', $h->link('label', 'a', 'b', array('d' => 'e'), false, 'f', 'g', true) ); } |