Page MenuHomePhabricator

Some Bridge messages are wrongly HTML encoded
Closed, ResolvedPublic5 Estimated Story Points

Description

Problem:
In the Wikidata Bridge, some messages are HTML encoded when they shouldn't be.

Steps to reproduce:

One way to reproduce:

  1. Go to https://en.wikipedia.beta.wmflabs.org/wiki/Wikidata_Bridge_Showcase
  2. start editing the category value
  3. before clicking publish on your edit disable network connection
  4. try to publish your edit
  5. see error message with wrong encoding

Screenshots/mockups:

image.png (474×526 px, 37 KB)

image.png (86×427 px, 7 KB)

Acceptance criteria:

  • we checked which messages in the Bridge are affected
  • messages are correctly encoded

Event Timeline

Addshore moved this task from Incoming to Needs Wikidata PM Work on the Wikidata-Campsite board.
Addshore added a subscriber: Lydia_Pintscher.

@Lydia_Pintscher this came to the tech prio session but we decided this this isn't really in our scope, thus handing over to you!

darthmon_wmde set the point value for this task to 5.Feb 3 2021, 1:19 PM

Copying from Mattermost:

the larger message is fine, and that one also has s'atribuiran and d'usuari in the JSON

Screenshot_2021-01-18 Hàmster de Roborovski - Viquipèdia, l'enciclopèdia lliure.jpeg (450×500 px, 47 KB)

ah, because the warning is an <IconMessageBox> with a <p v-html>, whereas the other things are <EventEmittingButton>s with :message=..., and the message is supposed to be plain text, not HTML…

Change 664578 had a related patch set uploaded (by Tonina Zhelyazkova; owner: Tonina Zhelyazkova):
[mediawiki/extensions/Wikibase@master] Use mw.Message's text() instead of parse()

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

Change 664578 abandoned by Tonina Zhelyazkova:
[mediawiki/extensions/Wikibase@master] bridge: Use mw.Message's plain() instead of parse()

Reason:

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

Change 664842 had a related patch set uploaded (by Tonina Zhelyazkova; owner: Tonina Zhelyazkova):
[mediawiki/extensions/Wikibase@master] bridge: Provide a messages.getText function which does not parse the string

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

Change 664842 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: Provide a messages.getText function which does not parse the string

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