I'm just starting looking at Ubiquity and I thought I'd write a simple
search shortcut as my first command. The results are available at
http://dave.org.uk/ubiquity/lovefilm.html.

But there's a problem with the command which becomes obvious when you
search for a string containing a space. If you search, for example,
for Woody Allen then the query text gets "double-url-encoded" and ends
up as "woody%2520allen" - which is "woody%20allen" with the % url-
encoded again for some reason.

Is this something that Utils.openUrlInBrowser is doing for me? Or is
it a problem with the LoveFilm web site?

My code is:

CmdUtils.CreateCommand({
  name: "lovefilm",
  synonyms: [ "lf" ],
  preview: "Searches for film titles, directors or actors at
LOVEFiLM.com",
  takes: {"search for": noun_arb_text},

  execute: function(input) {
    var query = input.text;
    var url   = "http://www.lovefilm.com/search/overview.html?
search_keywords=" + query;

    Utils.openUrlInBrowser(url);
    CmdUtils.setLastResult(url);
  },

  homepage: "http://dave.org.uk/ubiquity/lovefilm.html";,
  author: { name: "Dave Cross", email: "[email protected]"},
  license: "MPL",
});

Any help is appreciated.

Cheers,

Dave...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ubiquity-firefox" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/ubiquity-firefox?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to