perf: use http utility to decode url
This commit is contained in:
parent
d32d46e221
commit
59e42ff7cd
@ -1,3 +1,4 @@
|
||||
using System.Web;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using OliverBooth.Common.Data.Blog;
|
||||
@ -23,7 +24,7 @@ public class Index : PageModel
|
||||
{
|
||||
if (postId.HasValue == wpPostId.HasValue)
|
||||
{
|
||||
Tag = tag?.Split('+').Select(t => t.Replace("%20", " ")).ToArray() ?? [];
|
||||
Tag = (tag?.Split('+').Select(HttpUtility.UrlDecode).ToArray() ?? [])!;
|
||||
return Page();
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
using System.Web;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
@ -30,7 +31,7 @@ public class List : PageModel
|
||||
}
|
||||
|
||||
PageNumber = page;
|
||||
Tag = tag?.Split('+').Select(t => t.Replace("%20", " ")).ToArray() ?? [];
|
||||
Tag = (tag?.Split('+').Select(HttpUtility.UrlDecode).ToArray() ?? [])!;
|
||||
return Page();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user