aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2017-05-21 17:01:59 +0200
committerKevin Decherf <kevin@kdecherf.com>2017-08-27 16:51:23 +0200
commit7036d91fe7332a797bf5cbccec8790bcef8437d4 (patch)
treea1ba33f445cb7156c20f2e419c4b945bee8f1100 /src/Wallabag
parent2490f61dca635026a3eb9b5e9b6978b1981b1172 (diff)
downloadwallabag-7036d91fe7332a797bf5cbccec8790bcef8437d4.tar.gz
wallabag-7036d91fe7332a797bf5cbccec8790bcef8437d4.tar.zst
wallabag-7036d91fe7332a797bf5cbccec8790bcef8437d4.zip
Tag: render tags case-insensitive by storing them in lowercase
Fixes #2502 Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Entity/Tag.php2
-rw-r--r--src/Wallabag/CoreBundle/Helper/TagsAssigner.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Tag.php b/src/Wallabag/CoreBundle/Entity/Tag.php
index c19023af..a6dc8c50 100644
--- a/src/Wallabag/CoreBundle/Entity/Tag.php
+++ b/src/Wallabag/CoreBundle/Entity/Tag.php
@@ -78,7 +78,7 @@ class Tag
78 */ 78 */
79 public function setLabel($label) 79 public function setLabel($label)
80 { 80 {
81 $this->label = $label; 81 $this->label = mb_convert_case($label, MB_CASE_LOWER);
82 82
83 return $this; 83 return $this;
84 } 84 }
diff --git a/src/Wallabag/CoreBundle/Helper/TagsAssigner.php b/src/Wallabag/CoreBundle/Helper/TagsAssigner.php
index a2fb0b9a..0bfe5c57 100644
--- a/src/Wallabag/CoreBundle/Helper/TagsAssigner.php
+++ b/src/Wallabag/CoreBundle/Helper/TagsAssigner.php
@@ -45,7 +45,7 @@ class TagsAssigner
45 } 45 }
46 46
47 foreach ($tags as $label) { 47 foreach ($tags as $label) {
48 $label = trim($label); 48 $label = trim(mb_convert_case($label, MB_CASE_LOWER));
49 49
50 // avoid empty tag 50 // avoid empty tag
51 if (0 === strlen($label)) { 51 if (0 === strlen($label)) {