diff options
Diffstat (limited to 'lib/rhbzpage.js')
-rw-r--r-- | lib/rhbzpage.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js index dc0b250..10090a7 100644 --- a/lib/rhbzpage.js +++ b/lib/rhbzpage.js @@ -577,9 +577,14 @@ RHBugzillaPage.prototype.setBranding = function() { RHBugzillaPage.prototype.queryUpstream = function() { var text = this.getSelectionOrClipboard(); if (text) { - text = encodeURIComponent(text.trim()); var queryUpstreamBugsURLArray = this.constantData.queryUpstreamBug; - var urlBase = util.filterByRegexp(queryUpstreamBugsURLArray, this.getComponent()); + var searchData = util.filterByRegexp(queryUpstreamBugsURLArray, this.getComponent()); + var urlBase = searchData.url; + text = searchData.searchBy+":"+searchData.fillIn+" "+text.trim(); + if (searchData.fillIn == "$$$") { + text = text.replace("$$$", this.getComponent()); + } + text = encodeURIComponent(text).replace("%20","+"); tabs.open({ url: urlBase + text, inBackground: true, |