From 1eea545c0a9e2ea871a98f5adcede515055a0d95 Mon Sep 17 00:00:00 2001 From: ta264 Date: Sat, 12 Jan 2019 16:55:33 +0000 Subject: [PATCH] Remove typographic apostrophe (#586) This is the preferred apostrophe on musicbrainz https://beta.musicbrainz.org/doc/Style/Miscellaneous --- .../IndexerSearchTests/SearchDefinitionFixture.cs | 2 ++ .../IndexerSearch/Definitions/SearchCriteriaBase.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/IndexerSearchTests/SearchDefinitionFixture.cs b/src/NzbDrone.Core.Test/IndexerSearchTests/SearchDefinitionFixture.cs index 5451cf758..d2b04848f 100644 --- a/src/NzbDrone.Core.Test/IndexerSearchTests/SearchDefinitionFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerSearchTests/SearchDefinitionFixture.cs @@ -22,6 +22,8 @@ namespace NzbDrone.Core.Test.IndexerSearchTests [TestCase("American III: Solitary Man", "American+III+Solitary+Man")] [TestCase("Sad Clowns & Hillbillies", "Sad+Clowns+Hillbillies")] [TestCase("¿Quién sabe?", "Quien+sabe")] + [TestCase("Seal the Deal & Let’s Boogie", "Seal+the+Deal+Lets+Boogie")] + [TestCase("Section.80", "Section80")] public void should_replace_some_special_characters(string album, string expected) { Subject.AlbumTitle = album; diff --git a/src/NzbDrone.Core/IndexerSearch/Definitions/SearchCriteriaBase.cs b/src/NzbDrone.Core/IndexerSearch/Definitions/SearchCriteriaBase.cs index 8dddfd2ad..57b939fd1 100644 --- a/src/NzbDrone.Core/IndexerSearch/Definitions/SearchCriteriaBase.cs +++ b/src/NzbDrone.Core/IndexerSearch/Definitions/SearchCriteriaBase.cs @@ -9,7 +9,7 @@ namespace NzbDrone.Core.IndexerSearch.Definitions { public abstract class SearchCriteriaBase { - private static readonly Regex SpecialCharacter = new Regex(@"[`'.]", RegexOptions.IgnoreCase | RegexOptions.Compiled); + private static readonly Regex SpecialCharacter = new Regex(@"[`'’.]", RegexOptions.IgnoreCase | RegexOptions.Compiled); private static readonly Regex NonWord = new Regex(@"[\W]", RegexOptions.IgnoreCase | RegexOptions.Compiled); private static readonly Regex BeginningThe = new Regex(@"^the\s", RegexOptions.IgnoreCase | RegexOptions.Compiled);