added search url encoding
This commit is contained in:
parent
6a47760cbf
commit
cdbfb8c185
3 changed files with 7 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using JellyGlass.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Web;
|
||||
|
||||
namespace JellyGlass.Controllers;
|
||||
|
||||
|
|
@ -19,7 +20,8 @@ public class SearchController : ControllerBase
|
|||
[HttpGet]
|
||||
public async Task<IActionResult> handleSearch([FromQuery] string searchTerm, string serverId)
|
||||
{
|
||||
var results = await _service.Search(searchTerm, serverId);
|
||||
var decodedSearchTerm = HttpUtility.UrlDecode(searchTerm);
|
||||
var results = await _service.Search(decodedSearchTerm, serverId);
|
||||
|
||||
return Ok(results);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue