Page MenuHomePhabricator

Trimmed name for Firefox search plugin
Closed, ResolvedPublic


Author: wooptoo

trimmed name triggers the Add item again

Steps to reproduce:
(Firefox only)

  1. go to Wikimedia Commons home page:
  2. click on the icon of the search field in Firefox
  3. click "Add Wikimedia Commons {English)"
  4. click on the icon of the search field again


The search plugin is added with the name "Wikimedia Commons {Engli" instead of the full name.
This also triggers the reappearing of the "Add Wikimedia Commons {English)" item, because the browser thinks it hasn't been added yet.

Proposed solution:

Because the name for Firefox search plugins is limited to 24 characters, Wikimedia could choose to rename the plugin from "Wikimedia Commons {English)" to something like "Wikimedia Commons EN".

Version: unspecified
Severity: normal


x.png (208×215 px, 6 KB)



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:07 PM
bzimport set Reference to bz12723.
bzimport added a subscriber: Unknown Object (MLST).

wooptoo wrote:

It seems that Firefox supports plugin names longer than 24 characters.
This is a bug in Wikimedia's :
<ShortName>Wikimedia Commons (Engli</ShortName>

robert wrote:

Due to the OpenSearch 1.1 Draft 3 specification the ShortName tag must contain 16 or fewer characters, therefore this is a bug in two respects -- it exceeds the limit and trims to a weird place. A suggested fix would be to use the language code instead of the language name, to help reduce the length as the title could easily exceed this, and to trim to 16 characters instead, satisfying the specification. Adding a further global configuration variable might help things further - but probably few website owners would care enough so it would largely go unused.

Switched the description in r31336/r31337 to use the language code, which is more compact. The entire text is now overridable in an 'opensearch-desc' message.

(Note this change won't be live on Wikimedia sites immediately.)

Updated in r31469 to use the same desc message for the <link> header as well as the final XML. Should resolve issue with Firefox thinking it wasn't the same search plugin due to different name.