Browse Source

Blogging: Convert tags to lowercase

resolves https://github.com/abpframework/abp/issues/11699
pull/11843/head
Yunus Emre Kalkan 5 years ago
parent
commit
abf75f8895
  1. 13
      modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs

13
modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs

@ -231,11 +231,16 @@ namespace Volo.Blogging.Posts
return url;
}
private async Task SaveTags(ICollection<string> newTags, Post post)
private async Task SaveTags(ICollection<string> tags, Post post)
{
await RemoveOldTags(newTags, post);
await AddNewTags(newTags, post);
tags = tags
.Select(t => t.ToLowerInvariant())
.Distinct()
.ToList();
await RemoveOldTags(tags, post);
await AddNewTags(tags, post);
}
private async Task RemoveOldTags(ICollection<string> newTags, Post post)

Loading…
Cancel
Save