If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Fix Twitter built-in search engine URL

RESOLVED FIXED in Firefox 19

Status

()

Firefox
Search
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: fryn, Assigned: fryn)

Tracking

Trunk
Firefox 19
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
Created attachment 672998 [details] [diff] [review]
patch

We're using the wrong URL in our built-in Twitter search engine.
With our current URL, Twitter incorrectly parses any query that contains a space.
For example, typing "hello world" (excluding those quotation marks) results in the Twitter query: hello+world

We can easily fix this by changing the URL from:
https://twitter.com/search/{searchTerms}
to:
https://twitter.com/search?q={searchTerms}

Fixing this will also make search result page detection much easier if we ever need it.

Kev, could you make sure that doing this doesn't break anything on Twitter's end, i.e. Twitter still recognizing that the search came from Firefox?
Attachment #672998 - Flags: review?(gavin.sharp)
(In reply to Frank Yan (:fryn) from comment #0)
> Created attachment 672998 [details] [diff] [review]

You should move the parameter to a <Param> element because that's what it's meant for and it'll be consistent with our other default engines. (e.g. https://mxr.mozilla.org/mozilla-central/source/browser/locales/en-US/searchplugins/bing.xml#15 )
Component: General → Search
Comment on attachment 672998 [details] [diff] [review]
patch

I agree with Matt. Otherwise this looks fine, and obviously the result is nicer - but IIRC Twitter specifically asked us to use this URL, so we need to get sign-off from them.
Attachment #672998 - Flags: review?(gavin.sharp) → review-
(Assignee)

Comment 3

5 years ago
Created attachment 673180 [details] [diff] [review]
patch v2

(In reply to Matthew N. [:MattN] from comment #1)

Oops! Good catch. I copied the line https://mxr.mozilla.org/mozilla-central/source/browser/locales/en-US/searchplugins/google.xml#20 which was the wrong example to use.
Attachment #673180 - Flags: review?(kev)
Attachment #673180 - Flags: review?(gavin.sharp)
(Assignee)

Updated

5 years ago
Attachment #672998 - Attachment is obsolete: true
Attachment #673180 - Flags: review?(gavin.sharp) → review+

Comment 4

5 years ago
Received confirmation this eve from Twitter that this change is approved/encouraged.
Attachment #673180 - Flags: review?(kev)
(Assignee)

Comment 5

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/6ed5e25d980a

(In reply to Kev Needham [:kev] from comment #4)

Thanks for your help, Kev & Gavin & Matt! :)
Target Milestone: --- → Firefox 19

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/6ed5e25d980a
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.