Closed Bug 862125 Opened 9 years ago Closed 9 years ago

Unable to uninstall or disable added search engine

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 23

People

(Reporter: aaronmt, Assigned: Margaret)

Details

(Keywords: reproducible)

Attachments

(1 file)

Currently on Nightly, I am unable to disable or uninstall a self added 'search engine'. In my case, I am using http://ncix.com and the search field on the top right (long-tap, 'Add Search Engine')

E/GeckoConsole(28594): [JavaScript Error: "SyntaxError: An invalid or illegal string was specified" {file: "chrome://browser/content/aboutAddons.js" line: 224}]

After installation, I went to about:addons and attempted to disable and uninstall it, both yield the error above.

--
Nightly (04/15)
LG Nexus 4 (Android 4.2.2)
Seems like about:addon's doesn't really like 'NCIX.com - Canada's Premier Computer Store - Online PC Discount Store, Buy Computer Accessories', not sure if it's barfing on the apostrophe or just the string length (title) as a name. I added the search box as 'NCIX.com' and about:addons works.
(In reply to Aaron Train [:aaronmt] from comment #1)
> Seems like about:addon's doesn't really like 'NCIX.com - Canada's Premier
> Computer Store - Online PC Discount Store, Buy Computer Accessories', not
> sure if it's barfing on the apostrophe or just the string length (title) as
> a name. I added the search box as 'NCIX.com' and about:addons works.

Yeah, the problem here is that we're using the search engine name as the addon id, and this querySelector call is failing to try to get the element with that attribute value. We should come up with a more robust way to keep track of these addon elements.
Assignee: nobody → margaret.leibovic
Attached patch patchSplinter Review
The real problem was caused by the fact that there was a single quote in the engine name, and we were using single quotes to quote the name. Using String.quote() is a more robust way to handle quoting the name string.
Attachment #738112 - Flags: review?(bnicholson)
Comment on attachment 738112 [details] [diff] [review]
patch

Review of attachment 738112 [details] [diff] [review]:
-----------------------------------------------------------------

aKey.quote() looks good too as discussed on IRC.
Attachment #738112 - Flags: review?(bnicholson) → review+
https://hg.mozilla.org/mozilla-central/rev/3721d3ca4095
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.