projects
/
WebThing.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add plugin path, separate search plugins
[WebThing.git]
/
searchplugins
/
GoogleSearch.cs
diff --git
a/plugins/GoogleSearch.cs
b/searchplugins/GoogleSearch.cs
similarity index 57%
rename from
plugins/GoogleSearch.cs
rename to
searchplugins/GoogleSearch.cs
index
7b1b542
..
1d345cb
100644
(file)
--- a/
plugins/GoogleSearch.cs
+++ b/
searchplugins/GoogleSearch.cs
@@
-1,10
+1,10
@@
using System;
using System;
-using
bytex64.WebThing
;
+using
System.Web
;
using System.Text.RegularExpressions;
using System.Text.RegularExpressions;
+using bytex64.WebThing;
public class GoogleSearch : WebThingPlugin, ISearchPlugin {
public string SearchTransform(string search) {
public class GoogleSearch : WebThingPlugin, ISearchPlugin {
public string SearchTransform(string search) {
- string[] words = Regex.Split(search, @"\s+");
- return String.Format("http://google.com/search?q={0}", String.Join("%20", words));
+ return String.Format("http://google.com/search?q={0}", HttpUtility.UrlEncode(search));
}
}
}
}