Search API queries need some escaping

RESOLVED FIXED in 1.2

Status

Chat Core
Twitter
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: florian, Assigned: clokep)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [1.2-wanted])

Attachments

(1 attachment, 1 obsolete attachment)

*** Original post on bio 1218 at 2012-01-02 18:36:00 UTC ***

Warning: sending request to http://search.twitter.com/search.json?q=#fail&since_id=153821308789071873 (POSTData = )
Source File: resource:///modules/http.jsm
Line: 110
Source Code:
xhr: doXHRequest

Warning: Received response: {"error":"You must enter a query."}
Source File: resource:///modules/http.jsm
Line: 80
Source Code:
xhr
Whiteboard: [1.2-wanted]
(Assignee)

Comment 1

4 years ago
Created attachment 8352864 [details] [diff] [review]
Simple fix v1

*** Original post on bio 1218 as attmnt 1121 at 2012-01-16 21:15:00 UTC ***

This simply percent encodes the get parameters we send for the track keyword.
Attachment #8352864 - Flags: review?(florian)
(Assignee)

Updated

4 years ago
Assignee: nobody → clokep
Status: NEW → ASSIGNED
(Assignee)

Comment 2

4 years ago
Created attachment 8352865 [details] [diff] [review]
Simpler fix v2

*** Original post on bio 1218 as attmnt 1122 at 2012-01-16 22:10:00 UTC ***

This does a pure encodeURIComponent instead of the extra percent encodings (which seems to be what twitter.com/search uses).

flo suggested using encodeURIComponent(track).split(","), but that doesn't work because , is percent encoded into %2C. This seemed to be the easiest solution.
Attachment #8352865 - Flags: review?(florian)
(Assignee)

Comment 3

4 years ago
Comment on attachment 8352864 [details] [diff] [review]
Simple fix v1

*** Original change on bio 1218 attmnt 1121 at 2012-01-16 22:10:56 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8352864 - Attachment is obsolete: true
Attachment #8352864 - Flags: review?(florian)
Comment on attachment 8352865 [details] [diff] [review]
Simpler fix v2

*** Original change on bio 1218 attmnt 1122 at 2012-06-10 20:41:21 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8352865 - Flags: review?(florian) → review+
(Assignee)

Comment 5

4 years ago
*** Original post on bio 1218 at 2012-06-10 21:06:12 UTC ***

Checked in as http://hg.instantbird.org/instantbird/rev/7bfe729f1a58
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
OS: Other → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → 1.2
You need to log in before you can comment on or make changes to this bug.