question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Encode spaces in URL path

See original GitHub issue

Describe the bug Sometimes the query string is not encoded and it comes spaces within, for instance: “https://example.org/find?q=foo bar baz”. Therefore a DDG search is made, instead of opening the site directly.

Expected behavior Be able to detect if the string matches some url pattern, and if so, replace those spaces with %20 string, in order to go to specific url.

Smartphone (please complete the following information):

  • DDG App Version: 5.87.0
  • OS: Android

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
cmonfortepcommented, Oct 18, 2021

ok, gotcha. Good to know that it happens when opening external links. Thanks. Will investigate the issue 👍

0reactions
Crashillocommented, Oct 24, 2022

Closing the issue as we haven’t been able to address it and we haven’t seen enough feedback to prioritize it.

Haven’t you able to open an external link with spaces? For instance, a wikipedia article served from apps who doesn’t encode properly the urls, for instance: “https://en.wikipedia.org/wiki/Medina del Campo”

As you can see the url is bad parsed, but if you c&p the whole link the application should be able to replace such blank spaces with %20 characters. As simple as that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

URL encoding the space character: + or %20? - Stack Overflow
For HTTP URLs, a space in a path fragment part has to be encoded to "%20" (not, absolutely not "+"), while the "+"...
Read more >
Spaces and Uppercase characters in URLs - SISTRIX
Depending on the position of the spaces in a URL, different rules apply with regard to how those spaces are properly encoded. Uppercase...
Read more >
How to fix URL contains whitespace issue - Sitechecker
URL encoding simply doesn't allow spaces. A space is considered unsafe and makes a URL invalid. That's why whitespace is used instead. In...
Read more >
Spaces in Link and Image URL/URI (HTML Encoding) - Arclab
URLs use the ASCII charset. URL encoding replaces space characters with "%20" (percent followed by the ASCII code for a blank space).
Read more >
URL contains whitespace - Sitebulb
This means that the URL in question contains whitespace characters in the path. URLs with whitespace characters are not recommended as they could...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found