Skip to content

Commit 4f50400

Browse files
committed
Accounted for spaces in tag filtering
1 parent e436f07 commit 4f50400

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Controller/Component/TaggableComponent.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22
App::uses('Component', 'Controller');
3+
App::uses('Utility', 'Inflector');
4+
35
class TaggableComponent extends Component {
46
public $name = 'Taggable';
57

@@ -23,6 +25,9 @@ public function filterQuery($query = array()) {
2325
$tags = array();
2426
if (!empty($this->request->named['tag'])) {
2527
$tags = array($this->request->named['tag']);
28+
foreach ($tags as $k => $tag) {
29+
$tags[$k] = Inflector::humanize($tag);
30+
}
2631
$query['tags'] = $tags;
2732
}
2833
$this->controller->set(array('taggableTags' => $tags));

0 commit comments

Comments
 (0)