Browse Source
Merge pull request #11843 from abpframework/issue/11699
Blogging: Convert tags to lowercase
pull/12029/head
Berkan Sasmaz
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
9 additions and
4 deletions
-
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) |
|
|
|
|