Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Comments

feat: add raw-query option for search bangs#896

Open
NecRaul wants to merge 1 commit intoglanceapp:devfrom
NecRaul:raw-query
Open

feat: add raw-query option for search bangs#896
NecRaul wants to merge 1 commit intoglanceapp:devfrom
NecRaul:raw-query

Conversation

@NecRaul
Copy link

@NecRaul NecRaul commented Dec 6, 2025

This PR introduces a new optional raw-query flag for search bangs, giving users control over whether {QUERY} is URL encoded before being inserted into the bang URL.

What this changes

  • Adds raw-query: boolean to the bang configuration schema.
  • Defaults to false to preserve the existing behavior.
  • When raw-query: true, {QUERY} is substituted as-is, without encodeURIComponent.
  • Updates:
    • Documentation (configuration.md)
    • HTML template (search.html)
    • Client-side behavior (page.js)
    • Bang struct (widget-search.go)

Why

This resolves issue #527, allowing certain shortcuts to receive an unencoded path-style query. This is especially useful for URLs where slashes or special characters are meaningful, such as GitHub paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant