Search results do not load with %0A in them

<hidden> anonymous
Created: 4 years and 1 month ago
Hello,

I found what appears to be a small bug in DDG. Search terms with a newline (%0A) in them load instant answer boxes:

https://duckduckgo.com/?q=new%0Aline

but none of the actual results:

https://duckduckgo.com/?q=new%0Aline2

Newlines are sometimes in search terms when copying part of a webpage (for me, often an article title and its author) and pasting it into a new search.

Thanks! Long-time user of DDG here looking to help make it even better.

This forum has been archived

Thank you all for the many comments, questions and suggestions. Particular thanks go to user x.15a2 for constantly monitoring, replying and helping so many users here. To continue these discussions, please head over to the DuckDuckGo subreddit.


ScreapDK
Thanks for your report!
Actually, I'm wondering how yo, technically speaking, managed to paste a "new line" (aka. %0A) into the search field. I thought that was impossible. : D Well, you learn learn something new every day, don't you? : )
posted by ScreapDK Community Leader4 years and 1 month ago Link
crazedpsyc
Erm, yes, it should be. OP, what browser are you using?
Firefox and Chromium both strip newlines out of text pasted into the search fields or any single-line input box--as they should.
posted by crazedpsyc 4 years and 1 month ago Link
anonymous
I'm using Firefox on Ubuntu. This most often occurs when using the Vimperator extension -- pressing "p" opens the address (or search terms) from the clipboard. Since DDG is my default, any terms (and new lines) are searched in DDG, causing the problem.

Of course, this is a fairly isolated case, but anyone searching for something like "what does %0A mean?" would have the same problem.
posted by <hidden> • 4 years and 1 month ago Link
This comment has been removed for violation of our forum rules.
posted by <hidden> • 4 years and 1 month ago
crazedpsyc
That's because it (improperly) ignores the word 0A. Unrelated issue.
posted by crazedpsyc 4 years and 1 month ago Link
caine
I'm about to roll a fix out for this. As a few others have said it's odd the query managed to get an encoded \n into the query. It's actually having trouble in the JS and not on the backend. Thanks for writing us about it!
posted by caine Staff4 years and 1 month ago Link
caine
Just to play a bit more and show a small example of the kind of thing that was happening. :)

[http://imgur.com/kIbScCj]
posted by caine Staff4 years and 1 month ago Link