duckduckgo/zeroclickinfo-spice — pull request #35 by boyter (2012-05-24 02:49:39+00:00)
Title: searchcode doco API plugin

Ok, here is the revised searchcode doco plugin. I tried to make it look as much like the existing fathead sources. Depending on how you feel about the results you may want to either drop the fathead ones, or drop them from the regex EG I removed javascript because searchcode has them from w3schools which people seem to hate.

Some sample searches which work and hit most of the functionality,

php print_r
java ArrayList
java nextInt pseudorandom
hello world in c#

Things like perl wont work at the moment, but thats because the api needs that lookup which I will add on the backend.

I do have one question though, whats the decision regarding escaping HTML? I added a simple function which uses the browser to do this, but I suspect there may be an DDG one. Its actually a big issue potentially since plugins could have the ability to perform XSS attacks based on what I have seen.