duckduckgo / duckduckgo/Android

[Bug] Search Widget Doesn't Escape Single Quote

Open
#4,912 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs triage
Dominant language
Kotlin
Stars
4.8k
Forks
1.4k
Avg merge
2d 17h
Merged PRs (30d)
170

Description

Describe the bug

When searching with a single quote, the payload sent to the search engine doesn't handle it as a special character, so the search does not work.

Hello World's Search Results:
Screenshot_20240818_125134_DuckDuckGo

Hello World Search Results:

Screenshot_20240818_125103_DuckDuckGo

How to Reproduce
  1. Touch the Android Widget:
  2. Enter a search string with a single vertical quote '
  3. Touch Return.
Expected behavior

Before sending the search string, HTTP special characters should be replaced with the appropriate ASCII coding. (e.g. %27)

Environment
- DDG App Version: 5.211.0
- Device:  SM-F711U (GalaxyZ-Flip3 5G)
- OS: Android 14

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Android Widget search flow described in the reproduction steps and inspect how its query becomes the outgoing search payload. Reproduce the single-quote case, compare it with a query without the quote, and verify that the resulting request handles the character correctly and returns search results.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.