Skip to content

Commit

Permalink
[utils] bugfix _normalize_url() - replace space after unquote
Browse files Browse the repository at this point in the history
  • Loading branch information
deedy5 committed Aug 23, 2024
1 parent 837259f commit 2f2fd81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion duckduckgo_search/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _normalize(raw_html: str) -> str:

def _normalize_url(url: str) -> str:
"""Unquote URL and replace spaces with '+'."""
return unquote(url.replace(" ", "+")) if url else ""
return unquote(url).replace(" ", "+") if url else ""


def _calculate_distance(lat1: Decimal, lon1: Decimal, lat2: Decimal, lon2: Decimal) -> float:
Expand Down

0 comments on commit 2f2fd81

Please sign in to comment.