diff --git a/browser/installer/unix/browser.jst b/browser/installer/unix/browser.jst index 624a79abf81..c06db275a15 100644 --- a/browser/installer/unix/browser.jst +++ b/browser/installer/unix/browser.jst @@ -48,6 +48,10 @@ function upgradeCleanup() deleteThisFile("Program", "defaults/profile/panels.rdf"); deleteThisFolder("Program", "defaults/profile/US"); + // Delete dictionary.com search plugin + deleteThisFile("Program", "searchplugins/dictionary.src"); + deleteThisFile("Program", "searchplugins/dictionary.png"); + // These files are related to app patches and will interfere with the // UA/app version strings if we do not remove them. deleteThisFile("Program", "defaults/pref/bug259708.js"); diff --git a/browser/installer/windows/browser.jst b/browser/installer/windows/browser.jst index f0079c5993b..f96c57f9822 100644 --- a/browser/installer/windows/browser.jst +++ b/browser/installer/windows/browser.jst @@ -20,7 +20,11 @@ function upgradeCleanup() deleteThisFile("Program", "defaults/pref/winpref.js"); deleteThisFile("Program", "defaults/pref/xpinstall.js"); deleteThisFolder("Program", "defaults/profile/US"); - + + // Delete dictionary.com search plugin + deleteThisFile("Program", "searchplugins/dictionary.src"); + deleteThisFile("Program", "searchplugins/dictionary.png"); + // These files are related to app patches and will interfere with the // UA/app version strings if we do not remove them. deleteThisFile("Program", "defaults/pref/bug259708.js"); diff --git a/browser/locales/en-US/profile/bookmarks.html b/browser/locales/en-US/profile/bookmarks.html index f60bfbf787b..283301a1e23 100644 --- a/browser/locales/en-US/profile/bookmarks.html +++ b/browser/locales/en-US/profile/bookmarks.html @@ -19,9 +19,10 @@

Google Quicksearch
Type "google <search terms>" in the location bar to perform a Google search -
Dictionary.com Quicksearch +
Answers.com Dictionary Quicksearch
Type "dict <word>" in the location bar to perform a dictionary look-up -
Stock Symbol Quicksearch +
Stock Symbol Quic +ksearch
Type "quote <symbol>" in the location bar to perform a stock symbol look-up
Wikipedia Quicksearch
Type "wp <something>" in the location bar to look up something in Wikipedia, a free online encyclopedia. @@ -35,7 +36,8 @@
Themes and Extensions
Firefox Product Page
The Mozilla web site -
MozillaZine +
MozillaZine
Mozilla Store
Get Involved - Help spread Firefox!

diff --git a/browser/locales/en-US/searchplugins/dictionary.png b/browser/locales/en-US/searchplugins/answers.png similarity index 100% rename from browser/locales/en-US/searchplugins/dictionary.png rename to browser/locales/en-US/searchplugins/answers.png diff --git a/browser/locales/en-US/searchplugins/list.txt b/browser/locales/en-US/searchplugins/list.txt index b3b3bcb7398..f8af3716e7e 100644 --- a/browser/locales/en-US/searchplugins/list.txt +++ b/browser/locales/en-US/searchplugins/list.txt @@ -1,6 +1,6 @@ google amazondotcom -dictionary eBay yahoo -creativecommons \ No newline at end of file +creativecommons +answers diff --git a/xpfe/components/search/src/nsInternetSearchService.cpp b/xpfe/components/search/src/nsInternetSearchService.cpp index bf330575424..eea80c3583e 100755 --- a/xpfe/components/search/src/nsInternetSearchService.cpp +++ b/xpfe/components/search/src/nsInternetSearchService.cpp @@ -2770,7 +2770,7 @@ InternetSearchDataSource::GetInternetSearchURL(const char *searchEngineURI, // we can only handle HTTP GET if (!method.LowerCaseEqualsLiteral("get")) return(NS_ERROR_UNEXPECTED); // HTTP Get method support - action += NS_LITERAL_STRING("?") + input; + action += input; // return a copy of the resulting search URL *resultURL = ToNewCString(action); @@ -4650,7 +4650,8 @@ InternetSearchDataSource::GetInputs(const PRUnichar *dataUni, nsString &engineNa nsresult rv = NS_OK; PRBool inSection = PR_FALSE; - PRBool inDirInput; // directional input: "inputnext" or "inputprev" + PRBool inDirInput; // directional input: "inputnext" or "inputprev" + PRBool foundInput = PR_FALSE; while(!buffer.IsEmpty()) { @@ -4747,7 +4748,8 @@ InternetSearchDataSource::GetInputs(const PRUnichar *dataUni, nsString &engineNa } } } - if (nameAttrib.IsEmpty()) continue; + if (foundInput && nameAttrib.IsEmpty()) + continue; // first look for value attribute nsAutoString valueAttrib; @@ -4796,16 +4798,33 @@ InternetSearchDataSource::GetInputs(const PRUnichar *dataUni, nsString &engineNa if (line.RFind("mode=browser", PR_TRUE) >= 0) continue; - if (!nameAttrib.IsEmpty() && !valueAttrib.IsEmpty()) + if (!valueAttrib.IsEmpty()) { + // Here's how we construct the input string: + // is first: Name Attr: Prefix Data Example: + // YES EMPTY None ACTION + // YES NON-EMPTY ? = ACTION?= + // NO EMPTY ----------- ------------- + // NO NON-EMPTY & = ACTION?=&= if (!input.IsEmpty()) - { input.AppendLiteral("&"); - } - input += nameAttrib; - input.AppendLiteral("="); + else if (!nameAttrib.IsEmpty()) + input.AppendLiteral("?"); + + if (!nameAttrib.IsEmpty()) + { + input += nameAttrib; + input.AppendLiteral("="); + } + + // Indicate that we've already found an input, so we cannot have any + // inputs after this that do not have names. I could be more sophisticated + // than this but I don't care right now since I'm only doing this for one + // plugin. --ben + foundInput = PR_TRUE; + if (!inDirInput) - input += valueAttrib; + input += valueAttrib; else input.AppendInt( computeIndex(valueAttrib, pageNumber, direction) ); }