duckduckgo / zeroclickinfo-goodies

DuckDuckGo Instant Answers based on Perl & JavaScript
https://duckduckhack.com/
Other
979 stars 1.76k forks source link

url encode/decode "URL percent-encode:"/answer (respectively) getting double html entities encoded #3502

Closed slinnufra closed 8 years ago

slinnufra commented 8 years ago

https://duckduckgo.com/?q=url+encode+%22instant+answers%22&t=h_&ia=answer

The output looks like: URL percent-encode: "instant answers" The HTML is: URL percent-encode: "instant answers" The HTML should be: URL percent-encode: "instant answers"

https://duckduckgo.com/?q=url+decode+%2522instant%2520answers%2522&t=h_&ia=answer

The output looks like: "instant answers" The HTML is: "instant answers" The HTML should be: "instant answers"

It's right in the JSON; it seems the script just needs to take the existing encoding into account.

GuiltyDolphin commented 8 years ago

@slinnufra This could be something to do with one of our internal result issues - @moollaza what do you think (the encoding issue we had with output from Goodies)?

moollaza commented 8 years ago

@GuiltyDolphin yes this is a result of the encoding we're doing -- I'll bring it up again internally.

For now I'm to mark as tolerated because there's no immediate solution that I'm aware of.

moollaza commented 8 years ago

We should be able to fix this once https://github.com/duckduckgo/p5-app-duckpan/pull/372 is merged 👍