Skip to content

Commit

Permalink
fix: correctly escape spaces for non-DDG urls
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Sep 21, 2023
1 parent 9584453 commit f099a7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/rule-breaker/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ end
local function searchForTheRule(diag)
if not validDiagObj(diag) then return end
local query = (diag.code .. " " .. diag.source)
local escapedQuery = query:gsub(" ", "+") -- valid escaping for DuckDuckGo
local escapedQuery = query:gsub(" ", "%%20")

fn.setreg("+", query)
local url = config.searchUrl:format(escapedQuery)
Expand Down

0 comments on commit f099a7b

Please sign in to comment.