Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Web/Controllers/BlogController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Data.Models;
using FreeSql;
using Microsoft.AspNetCore.Mvc;
using System.Net;
using Web.Contrib.SiteMessage;
Comment on lines 1 to 5
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using System.Net; is unused because the code calls System.Net.WebUtility.HtmlEncode with a fully-qualified name. Either remove this using directive or switch the call to WebUtility.HtmlEncode(...) to avoid unused-using warnings.

Copilot uses AI. Check for mistakes.
using Web.Services;
using Web.ViewModels.Blog;
Expand Down Expand Up @@ -51,6 +52,8 @@ public async Task<IActionResult> List(int categoryId = 0, int page = 1, int page
return RedirectToAction(nameof(List));
}

sortBy = System.Net.WebUtility.HtmlEncode(sortBy);

return View(new BlogListViewModel
{
CurrentCategory = currentCategory,
Expand Down