Skip to content

Commit de90006

Browse files
authored
Merge pull request #627 from poppastring/fix-rss-category
Better comparison when we pass in RSS category names
2 parents c6f345b + cc15136 commit de90006

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/DasBlog.Web.Repositories/SubscriptionManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,15 +314,15 @@ private RssRoot GetRssCore(string category, int maxDayCount, int maxEntryCount)
314314

315315
protected EntryCollection BuildEntries(string category, int maxDayCount, int maxEntryCount)
316316
{
317-
EntryCollection entryList = new EntryCollection();
317+
var entryList = new EntryCollection();
318318

319319
if (category != null)
320320
{
321321
int entryCount = dasBlogSettings.SiteConfiguration.RssEntryCount;
322-
category = category.ToUpper();
323-
foreach (CategoryCacheEntry catEntry in dataService.GetCategories())
322+
category = category.Replace(dasBlogSettings.SiteConfiguration.TitlePermalinkSpaceReplacement, " ");
323+
foreach (var catEntry in dataService.GetCategories())
324324
{
325-
if (catEntry.Name.ToUpper() == category)
325+
if (string.Compare(catEntry.Name, category, CultureInfo.CurrentCulture, CompareOptions.IgnoreCase | CompareOptions.IgnoreSymbols) == 0)
326326
{
327327
foreach (CategoryCacheEntryDetail detail in catEntry.EntryDetails)
328328
{

0 commit comments

Comments
 (0)