From 11879ea37723a66acf708c4c0610810287303bd1 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 29 Mar 2020 12:51:39 +0200 Subject: [PATCH 1/2] Ensured tags are not sluggified when using them to filter short URL lists --- module/Core/src/Validation/ShortUrlsParamsInputFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/Core/src/Validation/ShortUrlsParamsInputFilter.php b/module/Core/src/Validation/ShortUrlsParamsInputFilter.php index b3e6db2d..20191fa1 100644 --- a/module/Core/src/Validation/ShortUrlsParamsInputFilter.php +++ b/module/Core/src/Validation/ShortUrlsParamsInputFilter.php @@ -39,7 +39,7 @@ class ShortUrlsParamsInputFilter extends InputFilter $tags = $this->createArrayInput(self::TAGS, false); $tags->getFilterChain()->attach(new Filter\StringToLower()) - ->attach(new Validation\SluggerFilter()); + ->attach(new Filter\PregReplace(['pattern' => '/ /', 'replacement' => '-'])); $this->add($tags); } } From e790a38ceabd507d9edeee7108ceb79f45f6b01b Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 29 Mar 2020 12:54:09 +0200 Subject: [PATCH 2/2] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ced9a5eb..2e2e6311 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this #### Fixed * [#700](https://github.com/shlinkio/shlink/issues/700) Fixed migration not working with postgres. +* [#690](https://github.com/shlinkio/shlink/issues/690) Fixed tags being incorrectly sluggified when filtering short URL lists, making results not be the expected. ## 2.1.1 - 2020-03-28