Page MenuHomePhabricator

Track which options are used in the Wikibase API
Open, Needs TriagePublic

Description

The Wikibase API gives users full control over the FormatterOptions and ParserOptions using the options parameter of the wbformatvalue and wbparsevalue modules, respectively. For instance, you can customize the strings used to format coordinates:

wbformatvalue without options

40°25'5.3000"N, 20°29'47.3000"E

wbformatvalue with options {"north": "<script>alert('hi')</script>","degree": "GRAAAAAAD"}

40GRAAAAAAD25&#39;5.3000&#34;&#60;script&#62;alert(&#39;hi&#39;)&#60;/script&#62;, 20GRAAAAAAD29&#39;47.3000&#34;E

I’d like to know if anybody actually specifies options – other than lang, which the Wikibase UI sets by default (even though it’s redundant with uselang, which it also sets). If, as I suspect, nobody makes use of this flexibility, it’s probably best to get rid of it, frankly. (I hope the rest of the team agrees with me, but I’m writing in first person singular not plural just in case ;) )

Event Timeline

Change 620708 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Track FormatterOptions+ParserOptions API usage

https://gerrit.wikimedia.org/r/620708

If we merge this let's make a ticket to remove it again in a few months and add it to wdwb-tech

Addshore edited projects, added wdwb-tech (legacy-backlog); removed wdwb-tech.
Addshore moved this task from Incoming to Active on the wdwb-tech (legacy-backlog) board.

Change 620708 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Track FormatterOptions+ParserOptions API usage

https://gerrit.wikimedia.org/r/620708