Skip to content

Enhancement: Validate input to avoid full URLs in "Try here" search box #234

Open

Description

@okroshan4u

Enhancement Request

The "Try here" input on the homepage (https://dictionaryapi.dev/) currently accepts full URLs. If a user mistakenly enters the entire API endpoint (e.g., https://api.dictionaryapi.dev/api/v2/entries/en/hello), the request ends up like:

https://api.dictionaryapi.dev/api/v2/entries/en/https://api.dictionaryapi.dev/api/v2/entries/en/hello

This causes a "Cannot GET" error and confusion for new users.

Suggested Fix

  • Add basic input validation to ensure only a single word (like hello) is accepted.
  • Optionally strip full URLs if pasted accidentally.

This small improvement would make the site more user-friendly and help prevent errors.

Thanks for this great free API!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions