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:


Acceptance criteria:

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

Event Timeline

Michael created this task.Jan 19 2021, 10:54 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 19 2021, 10:54 AM
Michael updated the task description. (Show Details)Jan 19 2021, 10:57 AM
Addshore moved this task from Incoming to Needs Product 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.Wed, Feb 3, 1:19 PM

Copying from Mattermost:

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


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…

Maintenance_bot moved this task from incoming to in progress on the Wikidata board.Wed, Feb 3, 2:15 PM

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